Externalize strings 26/2526/3
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 6 Dec 2018 21:38:15 +0000 (23:38 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 7 Dec 2018 21:47:45 +0000 (23:47 +0200)
* org.simantics.fileimport.ui
* org.simantics.graphviz.ui
* org.simantics.help.ui
* org.simantics.image.ui
* org.simantics.issues.ui
* org.simantics.logging.ui
* org.simantics.message.ui
* org.simantics.migration.ui
* org.simantics.modeling.ui (unfinished, contains around 1500 strings)

gitlab #210

Change-Id: Ib408f94694481876dfbedcf81b86e607bce3f32d

212 files changed:
bundles/org.simantics.fileimport.ui/src/org/simantics/fileimport/ui/ImportFileHandler.java
bundles/org.simantics.fileimport.ui/src/org/simantics/fileimport/ui/Messages.java [new file with mode: 0644]
bundles/org.simantics.fileimport.ui/src/org/simantics/fileimport/ui/messages.properties [new file with mode: 0644]
bundles/org.simantics.graphviz.ui/examples/org/simantics/graphviz/ui/examples/GraphvizComponentExample.java
bundles/org.simantics.graphviz.ui/src/org/simantics/graphviz/ui/AbstractGraphvizEditorPart.java
bundles/org.simantics.graphviz.ui/src/org/simantics/graphviz/ui/GraphvizComponent.java
bundles/org.simantics.graphviz.ui/src/org/simantics/graphviz/ui/GraphvizComponent2.java
bundles/org.simantics.graphviz.ui/src/org/simantics/graphviz/ui/Messages.java [new file with mode: 0644]
bundles/org.simantics.graphviz.ui/src/org/simantics/graphviz/ui/messages.properties [new file with mode: 0644]
bundles/org.simantics.help.ui/src/org/simantics/help/ui/HelpFileDocumentProvider.java
bundles/org.simantics.help.ui/src/org/simantics/help/ui/HelpFileEditor.java
bundles/org.simantics.help.ui/src/org/simantics/help/ui/Messages.java [new file with mode: 0644]
bundles/org.simantics.help.ui/src/org/simantics/help/ui/OpenHelpFileAdapter.java
bundles/org.simantics.help.ui/src/org/simantics/help/ui/messages.properties [new file with mode: 0644]
bundles/org.simantics.image.ui/src/org/simantics/image/ui/CreateImage.java
bundles/org.simantics.image.ui/src/org/simantics/image/ui/CreateImages.java
bundles/org.simantics.image.ui/src/org/simantics/image/ui/ImportImagesActionFactory.java
bundles/org.simantics.image.ui/src/org/simantics/image/ui/Messages.java [new file with mode: 0644]
bundles/org.simantics.image.ui/src/org/simantics/image/ui/editor/ImageEditor.java
bundles/org.simantics.image.ui/src/org/simantics/image/ui/internal/Activator.java
bundles/org.simantics.image.ui/src/org/simantics/image/ui/messages.properties [new file with mode: 0644]
bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/Image.java
bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/ImageLabeler.java
bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/Images.java
bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/ImagesLabeler.java
bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/Messages.java [new file with mode: 0644]
bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/messages.properties [new file with mode: 0644]
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/All.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/IssueImageRule.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/IssueLabelRule.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/IssueView2.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/Messages.java [new file with mode: 0644]
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/SetSeverityAction.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/SeverityFolderLabelRule.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/contribution/IssueLabelDecorationRule.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/ConfigureIssueSources.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/ExportIssuesAsCsv.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/FunctionHandler.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/Help.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/Hide.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/MenuActions.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/Messages.java [new file with mode: 0644]
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/NewUserIssue.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/PreferenceHandler.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/PurgeResolvedIssues.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/RunActiveValidations.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/Unhide.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/messages.properties [new file with mode: 0644]
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/internal/Activator.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/messages.properties [new file with mode: 0644]
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/preferences/IssuePreferencePage.java
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/preferences/Messages.java [new file with mode: 0644]
bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/preferences/messages.properties [new file with mode: 0644]
bundles/org.simantics.logging.ui/src/org/simantics/logging/ui/handlers/Messages.java [new file with mode: 0644]
bundles/org.simantics.logging.ui/src/org/simantics/logging/ui/handlers/SaveLogFilesHandler.java
bundles/org.simantics.logging.ui/src/org/simantics/logging/ui/handlers/SelectLoggingLevelHandler.java
bundles/org.simantics.logging.ui/src/org/simantics/logging/ui/handlers/messages.properties [new file with mode: 0644]
bundles/org.simantics.message.ui/src/org/simantics/message/ui/Activator.java
bundles/org.simantics.message.ui/src/org/simantics/message/ui/EventDetailsDialog.java
bundles/org.simantics.message.ui/src/org/simantics/message/ui/LogView.java
bundles/org.simantics.message.ui/src/org/simantics/message/ui/Messages.java
bundles/org.simantics.message.ui/src/org/simantics/message/ui/TextColors.java
bundles/org.simantics.message.ui/src/org/simantics/message/ui/messages.properties
bundles/org.simantics.message.ui/src/org/simantics/message/ui/scheme/HttpSchemeHandler.java
bundles/org.simantics.message.ui/src/org/simantics/message/ui/scheme/ResourceSchemeHandler.java
bundles/org.simantics.message.ui/src/org/simantics/message/ui/test/Messages.java [deleted file]
bundles/org.simantics.message.ui/src/org/simantics/message/ui/test/TestResourceStatusHandler.java
bundles/org.simantics.message.ui/src/org/simantics/message/ui/test/messages.properties [deleted file]
bundles/org.simantics.migration.ui/src/org/simantics/migration/ui/Messages.java [new file with mode: 0644]
bundles/org.simantics.migration.ui/src/org/simantics/migration/ui/MigrateActionFactory.java
bundles/org.simantics.migration.ui/src/org/simantics/migration/ui/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/Activator.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/ModelingUIUtils.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/SCLClipboard.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/SCLDiagramTemplate.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/AssignSymbolGroup.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/AssignSymbolGroupsDialog.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/CompilePGraphsAction.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/ConfigureConnectionTypes.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/Copy.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/CreateEllipse.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/CreatePath.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/CreateRectangle.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/CreateShapeHandler.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/CreateText.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/DuplicatePinnedViewHandler.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/ExpandFlagsHandler.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/ExplorerDynamicMenuContribution.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/ImportSVG.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/MergeFlagsAction.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/MergeFlagsHandler.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/MergeRelatedFlagsHandler.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/ModeledActions.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/ModeledDoubleClickActions.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewComponentTypeAction.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewConnectionPoint.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewDocument.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewLibrary.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewProceduralComponentType.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/NewSubscription.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/RenameDiagramComponents.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/SetInitialState.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/SwitchComponentTypeContribution.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/WorkbenchMessages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/e4/GlobalModeledToolbarActions.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/e4/ImportSVGPNG.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/e4/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/e4/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/AWTStyleDialog.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/EditStyle.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/FontChooser.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/MetricsEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/chart/property/ChartComposite.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/chart/property/DoublePropertyFactory.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/chart/property/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/chart/property/ObtainedDoubleStringAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/chart/property/TimeInputValidator.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/chart/property/TimePropertyFactory.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/chart/property/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeScriptEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeViewer.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ComponentTypeViewerData.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ConfigurationPropertiesSection.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/DerivedPropertiesSection.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/LiftPropertiesDialog.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/PGraphEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/PGraphEditorDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/PGraphSourceViewerConfigurationNew.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ProceduralComponentInstanceViewer.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ProceduralComponentInstanceViewerEditorAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ProceduralComponentTypeCodeDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/ProceduralComponentTypeEditorNamingService.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLEditorBase.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLEditorBaseUndoHandler.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLModuleEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLModuleEditorAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLModuleEditorDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLModuleViewer.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLQueryEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SCLQueryEditorDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolCodeDocumentProvider2.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/SymbolDropHandlerDocumentProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/componentTypeEditor/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/PageDescComposite.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/PageSettingsDialog.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/ResetProfileMonitorTransformContribution.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/SetFocusabilityContribution.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/SliderClass.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/ToggleProfileMonitorsContribution.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/UpDownProfileMonitorsContribution.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/ValueFormatUtil.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/AvailableFormatFactory.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/CurrentExpressionFactory.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/MonitorClassFactory2.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/MonitorComposite.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/MonitorExpressionVisitor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/MonitorListener.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/MonitorValue.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/MonitorVariableWrite.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/MonitorWriter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/RealizedFormatterAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/ResolveMonitorVariable.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/monitor/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/renaming/ComponentsRenamingDialog.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/renaming/ComponentsRenamingModel.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/renaming/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/renaming/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/ConnectionPointNameStyle.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/DocumentDecorationStyle.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/IssueDecorationStyle.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/SymbolTerminalNameStyle.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagram/style/TypicalInheritanceStyle.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DefaultTerminalNamingStrategy.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramLayersPage.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramOutlinePage.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewer.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerActionContributor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerLoadJob.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerSelectionProvider.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DisposingPolicy.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/Messages.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/OpenDiagramAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/OpenDiagramFromComponentAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/OpenDiagramFromConfigurationAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/OpenDiagramFromIssue.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/OpenDiagramFromSymbolAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/OpenSheetAdapter.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/PopulateElementMonitorDropParticipant.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/SheetViewer.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/WikiDiagramViewer.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/e4/DiagramEditor.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/e4/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/e4/PopulateElementDropParticipant.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/e4/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/messages.properties
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/messages.properties [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/wizard/Messages.java [new file with mode: 0644]
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/wizard/MigrateWizard.java
bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/wizard/messages.properties [new file with mode: 0644]
i18n.md

index fbe3ce7240f0ad55455d188cfb6872aa26affdd3..1bdcd15757985cd2ef14366630fc6499414f4aa0 100644 (file)
@@ -40,13 +40,13 @@ public class ImportFileHandler {
         // Sanity check
         for (int i = 0; i < filterExtensions.length; i++) {
             String extension = filterExtensions[i];
-            if (!extension.startsWith("*.")) {
-                System.err.println("Invalid extension filter provied: " + extension);
+            if (!extension.startsWith("*.")) { //$NON-NLS-1$
+                System.err.println("Invalid extension filter provied: " + extension); //$NON-NLS-1$
             }
         }
 
         FileDialog dialog = new FileDialog(shell, SWT.OPEN);
-        dialog.setText("Choose File");
+        dialog.setText(Messages.ImportFileHandler_ChooseFile);
         dialog.setFilterExtensions(filterExtensions);
         dialog.setFilterNames(filterNames);
         final String fileName = dialog.open();
@@ -62,11 +62,11 @@ public class ImportFileHandler {
                        selectedResource = a.getAdapter(Resource.class);
                }
         } catch(NullPointerException | ClassCastException npe) {
-               LOGGER.warn("Failed to find selection, passing null to file importer", npe);
+               LOGGER.warn("Failed to find selection, passing null to file importer", npe); //$NON-NLS-1$
         }
         
         FileImportService.performFileImport(Paths.get(fileName), Optional.of(selectedResource), Optional.of((Consumer<Throwable>) t -> {
-            LOGGER.error("Could not import file " + fileName, t);
+            LOGGER.error("Could not import file " + fileName, t); //$NON-NLS-1$
         }));
     }
 }
\ No newline at end of file
diff --git a/bundles/org.simantics.fileimport.ui/src/org/simantics/fileimport/ui/Messages.java b/bundles/org.simantics.fileimport.ui/src/org/simantics/fileimport/ui/Messages.java
new file mode 100644 (file)
index 0000000..b6aa8dc
--- /dev/null
@@ -0,0 +1,15 @@
+package org.simantics.fileimport.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.fileimport.ui.messages"; //$NON-NLS-1$
+       public static String ImportFileHandler_ChooseFile;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
diff --git a/bundles/org.simantics.fileimport.ui/src/org/simantics/fileimport/ui/messages.properties b/bundles/org.simantics.fileimport.ui/src/org/simantics/fileimport/ui/messages.properties
new file mode 100644 (file)
index 0000000..ef53624
--- /dev/null
@@ -0,0 +1 @@
+ImportFileHandler_ChooseFile=Choose File
index dc9d1ada709eab4bb7bc3f10a94cb2e6ebf15792..f8f775932396c4eac8313d465d544ca4f3240297 100644 (file)
@@ -39,9 +39,9 @@ public class GraphvizComponentExample {
     private static Graph createGraph() {
         Graph graph = new Graph();
 
-        Node node1 = new Node(graph, "A");
-        Node node2 = new Node(graph, "B");
-        new Edge(graph, node1, node2).setLabel("A to B");
+        Node node1 = new Node(graph, "A"); //$NON-NLS-1$
+        Node node2 = new Node(graph, "B"); //$NON-NLS-1$
+        new Edge(graph, node1, node2).setLabel("A to B"); //$NON-NLS-1$
 
         return graph;
     }
index 2c39d32a7c6da4197e9f480437f634f1f440e782..2ee40c530ebb1f2c2dc354dc36a161e6d413877f 100644 (file)
@@ -75,7 +75,7 @@ public abstract class AbstractGraphvizEditorPart extends EditorPart {
         * @param graph
         */
     public void asyncSetGraph(final Graph graph) {
-       Job job = new Job("Layouting a graph") {
+       Job job = new Job(Messages.AbstractGraphvizEditorPart_LayoutingAGraph) {
 
                        @Override
                        protected IStatus run(IProgressMonitor monitor) {
index 6ba556da09d65f1076bb4108e9e2fb35dcca190d..9bcf9433dd47f328ef4b917401bb73ac3add4bbf 100644 (file)
@@ -69,8 +69,8 @@ public class GraphvizComponent extends Composite {
     }
     
     private void workaroundJava7FocusProblem(Frame frame) {
-        String ver = System.getProperty("java.version");
-        if (ver.startsWith("1.7") || ver.startsWith("1.8")) {
+        String ver = System.getProperty("java.version"); //$NON-NLS-1$
+        if (ver.startsWith("1.7") || ver.startsWith("1.8")) { //$NON-NLS-1$ //$NON-NLS-2$
             try {
                 frame.addWindowListener(new Java7FocusFixListener(this, frame));
             } catch (SecurityException e) {
@@ -90,7 +90,7 @@ public class GraphvizComponent extends Composite {
         Frame frame;
 
         public Java7FocusFixListener(Control control, Frame frame) throws NoSuchMethodException, SecurityException {
-            this.shellSetActiveControl = Shell.class.getDeclaredMethod("setActiveControl", Control.class);
+            this.shellSetActiveControl = Shell.class.getDeclaredMethod("setActiveControl", Control.class); //$NON-NLS-1$
             this.frame = frame;
             this.control = control;
         }
@@ -137,7 +137,7 @@ public class GraphvizComponent extends Composite {
                     initialized.wait();
             }
         } catch (InterruptedException e) {
-            throw new Error("GraphvizComponent AWT population interrupted for class " + this, e);
+            throw new Error("GraphvizComponent AWT population interrupted for class " + this, e); //$NON-NLS-1$
         }
     }
 
@@ -147,7 +147,7 @@ public class GraphvizComponent extends Composite {
      * @param graph
      */
     public void setGraph(Graph graph) {
-        setGraph(graph, "dot");
+        setGraph(graph, "dot"); //$NON-NLS-1$
     }
 
     /**
@@ -210,7 +210,7 @@ public class GraphvizComponent extends Composite {
     
     public void save(File file) throws IOException {
        if (drawable == null) {
-                       throw new IOException("Nothing to save");
+                       throw new IOException("Nothing to save"); //$NON-NLS-1$
                }
                Graph graph = drawable.getGraph();
                String algo = drawable.getAlgorithm();
@@ -222,16 +222,16 @@ public class GraphvizComponent extends Composite {
     }
     
     public String[] getFileExtensions() {
-       return new String[]{"*.svg","*.dot","*.eps", "*.jpg", "*.jpeg","*.pdf","*.png","*.ps"};
+       return new String[]{"*.svg","*.dot","*.eps", "*.jpg", "*.jpeg","*.pdf","*.png","*.ps"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
     }
     
     public String[] getFileNames() {
-       return new String[]{"Scalable Vector Graphics Image",  "DOT Image", "Encapsulated PostScript Image","JPG Image","JPG Image","Portable Document Format Image","Portable Network Graphics Image","PostScript Image"};
+       return new String[]{"Scalable Vector Graphics Image",  "DOT Image", "Encapsulated PostScript Image","JPG Image","JPG Image","Portable Document Format Image","Portable Network Graphics Image","PostScript Image"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
     }
     
     public static String getExtension(File file) {
                String filename = file.getName();
-               int index = filename.lastIndexOf(".");
+               int index = filename.lastIndexOf("."); //$NON-NLS-1$
                if (index < 0)
                        return null;
                return filename.substring(index+1).toLowerCase();
index 32988cd40fe440fbc36c664a72825bea5c66fa42..9d417f28b3990535473d1d5201bd15ae00143601 100644 (file)
@@ -65,7 +65,7 @@ public class GraphvizComponent2 extends Composite {
                     initialized.wait();
             }
         } catch (InterruptedException e) {
-            throw new Error("GraphvizComponent AWT population interrupted for class " + this, e);
+            throw new Error("GraphvizComponent AWT population interrupted for class " + this, e); //$NON-NLS-1$
         }
     }
 
@@ -75,7 +75,7 @@ public class GraphvizComponent2 extends Composite {
      * @param graph
      */
     public Computation<Graph> setGraph(Graph graph) {
-        return setGraph(graph, "dot");
+        return setGraph(graph, "dot"); //$NON-NLS-1$
     }
 
     /**
diff --git a/bundles/org.simantics.graphviz.ui/src/org/simantics/graphviz/ui/Messages.java b/bundles/org.simantics.graphviz.ui/src/org/simantics/graphviz/ui/Messages.java
new file mode 100644 (file)
index 0000000..2930b48
--- /dev/null
@@ -0,0 +1,15 @@
+package org.simantics.graphviz.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.graphviz.ui.messages"; //$NON-NLS-1$
+       public static String AbstractGraphvizEditorPart_LayoutingAGraph;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
diff --git a/bundles/org.simantics.graphviz.ui/src/org/simantics/graphviz/ui/messages.properties b/bundles/org.simantics.graphviz.ui/src/org/simantics/graphviz/ui/messages.properties
new file mode 100644 (file)
index 0000000..73b755b
--- /dev/null
@@ -0,0 +1 @@
+AbstractGraphvizEditorPart_LayoutingAGraph=Layouting a graph\r
index a298474555691434846493ea614aa8be7ab744c1..3ab4d8b0a1c452618b6cee82cfbae7e3522d6c1e 100644 (file)
@@ -40,7 +40,7 @@ public class HelpFileDocumentProvider extends AbstractDocumentProvider {
                 public Document perform(ReadGraph graph) throws DatabaseException {
                     currentText = HelpUtils.readHelpFileContents(graph, resource);
                     errorHappened = false;
-                    return new Document(currentText != null ? currentText : "");
+                    return new Document(currentText != null ? currentText : ""); //$NON-NLS-1$
                 }
             });
         } catch (DatabaseException e) {
@@ -59,14 +59,14 @@ public class HelpFileDocumentProvider extends AbstractDocumentProvider {
 
     @Override
     protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {
-        TimeLogger.resetTimeAndLog("HelpFileDocumentProvider.doSaveDocument");
+        TimeLogger.resetTimeAndLog("HelpFileDocumentProvider.doSaveDocument"); //$NON-NLS-1$
         currentText = document.get();
         Simantics.getSession().asyncRequest(new WriteRequest() {
             @Override
             public void perform(WriteGraph graph) throws DatabaseException {
                 graph.markUndoPoint();
                 HelpUtils.saveHelpFileContents(graph, resource, currentText);
-                Layer0Utils.addCommentMetadata(graph, "Saved SCL Module " + graph.getRelatedValue2(resource, Layer0.getInstance(graph).HasName, Bindings.STRING));
+                Layer0Utils.addCommentMetadata(graph, "Saved SCL Module " + graph.getRelatedValue2(resource, Layer0.getInstance(graph).HasName, Bindings.STRING)); //$NON-NLS-1$
             }
         });
     }
index 56e692607736ab0eec55b01c49d42a7e877e575b..1626a1b590ed7e8ef6f277bd590d1d2913270214 100644 (file)
@@ -22,7 +22,7 @@ import winterwell.markdown.editors.MarkdownEditor;
 
 public class HelpFileEditor extends MarkdownEditor {
 
-    private static final String EDITOR_ID = "org.simantics.help.ui.HelpFileEditor";
+    private static final String EDITOR_ID = "org.simantics.help.ui.HelpFileEditor"; //$NON-NLS-1$
 
     private boolean disposed;
 
@@ -45,7 +45,7 @@ public class HelpFileEditor extends MarkdownEditor {
         try {
             getResourceInput().init(null);
         } catch (DatabaseException e) {
-            throw new PartInitException("Failed to initialize " + input, e);
+            throw new PartInitException("Failed to initialize " + input, e); //$NON-NLS-1$
         }
 
     }
diff --git a/bundles/org.simantics.help.ui/src/org/simantics/help/ui/Messages.java b/bundles/org.simantics.help.ui/src/org/simantics/help/ui/Messages.java
new file mode 100644 (file)
index 0000000..2a6c049
--- /dev/null
@@ -0,0 +1,15 @@
+package org.simantics.help.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.help.ui.messages"; //$NON-NLS-1$
+       public static String OpenHelpFileAdapter_HelpFileEditor;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index 38d33e0a230fd8a52d9a85829521f8d24f5305bf..33b347aaa0eed8a500c96b4f52630749fc010d40 100644 (file)
@@ -22,7 +22,7 @@ public class OpenHelpFileAdapter extends AbstractResourceEditorAdapter {
     private static final Logger LOGGER = LoggerFactory.getLogger(OpenHelpFileAdapter.class);
 
     public OpenHelpFileAdapter() {
-        super("Help File Editor");
+        super(Messages.OpenHelpFileAdapter_HelpFileEditor);
     }
 
     protected String getEditorId() {
@@ -51,7 +51,7 @@ public class OpenHelpFileAdapter extends AbstractResourceEditorAdapter {
                             String editorId = getEditorId();
                             WorkbenchUtils.openEditor(editorId, new ResourceEditorInput2(editorId, input, model, rvi));
                         } catch (PartInitException e) {
-                            LOGGER.error("Failed to open an editor for help file.", e);
+                            LOGGER.error("Failed to open an editor for help file.", e); //$NON-NLS-1$
                         }
                     }
                 });
diff --git a/bundles/org.simantics.help.ui/src/org/simantics/help/ui/messages.properties b/bundles/org.simantics.help.ui/src/org/simantics/help/ui/messages.properties
new file mode 100644 (file)
index 0000000..24de2b0
--- /dev/null
@@ -0,0 +1 @@
+OpenHelpFileAdapter_HelpFileEditor=Help File Editor\r
index f10ada1e154fe375e224f7421206c6997f92068f..f602d31d40a86a691bdd5bb899bee12deb08171d 100644 (file)
@@ -37,20 +37,20 @@ public class CreateImage extends WriteRequest {
     public static Resource getType(ReadGraph graph, ImageSource source) throws DatabaseException {
        ImageResource IMAGE = ImageResource.getInstance(graph);
        String name = source.name.toLowerCase();
-       if(name.endsWith("svg")) return IMAGE.SvgImage;
-       else if(name.endsWith("png")) return IMAGE.PngImage;
-       else if(name.endsWith("jpg") || name.endsWith("jpeg")) return IMAGE.JpegImage;
-       else if(name.endsWith("gif")) return IMAGE.GifImage;
-       else throw new DatabaseException("Unsupported image format " + source.name);
+       if(name.endsWith("svg")) return IMAGE.SvgImage; //$NON-NLS-1$
+       else if(name.endsWith("png")) return IMAGE.PngImage; //$NON-NLS-1$
+       else if(name.endsWith("jpg") || name.endsWith("jpeg")) return IMAGE.JpegImage; //$NON-NLS-1$ //$NON-NLS-2$
+       else if(name.endsWith("gif")) return IMAGE.GifImage; //$NON-NLS-1$
+       else throw new DatabaseException("Unsupported image format " + source.name); //$NON-NLS-1$
     }
     
     public static void claimLiteral(WriteGraph graph, Resource image, ImageSource source) throws DatabaseException {
         String name = source.name.toLowerCase();
-        if (name.endsWith("svg"))
+        if (name.endsWith("svg")) //$NON-NLS-1$
             graph.claimValue(image, new String(source.data), Bindings.STRING);
-        else if (name.endsWith("png") || name.endsWith("jpg") || name.endsWith("jpeg") || name.endsWith("gif"))
+        else if (name.endsWith("png") || name.endsWith("jpg") || name.endsWith("jpeg") || name.endsWith("gif")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
             graph.claimValue(image, source.data, Bindings.BYTE_ARRAY);
-       else throw new DatabaseException("Unsupported image format " + source.name);
+       else throw new DatabaseException("Unsupported image format " + source.name); //$NON-NLS-1$
     }
 
     @Override
@@ -66,7 +66,7 @@ public class CreateImage extends WriteRequest {
        graph.claimLiteral(image, L0.HasName, source.name, Bindings.STRING);
        claimLiteral(graph, image, source);
        graph.claim(parent, L0.ConsistsOf, image);
-       Layer0Utils.addCommentMetadata(graph, "Imported image " + source.name + " " + image.toString());
+       Layer0Utils.addCommentMetadata(graph, "Imported image " + source.name + " " + image.toString()); //$NON-NLS-1$ //$NON-NLS-2$
        return image;
        
 //     if(file.getPath().endsWith("svg")) {
index 2fe579533849adef66152b0ba9dfb87d096212c3..45a8487cc5c03bfc34c21d14b8d29b1df0b784a9 100644 (file)
@@ -15,6 +15,7 @@ import java.io.File;
 import java.io.IOException;
 import java.util.Collection;
 
+import org.eclipse.osgi.util.NLS;
 import org.simantics.db.Resource;
 import org.simantics.db.WriteGraph;
 import org.simantics.db.common.request.WriteRequest;
@@ -41,7 +42,7 @@ public class CreateImages extends WriteRequest {
                 ImageSource src = ImportImagesActionFactory.toImageSource(file);
                 new CreateImage(container, src).perform(graph);
             } catch (IOException e) {
-                ErrorLogger.defaultLogError("Failed to import image " + file.getName() + ", see exception for details.", e);
+                ErrorLogger.defaultLogError(NLS.bind(Messages.CreateImages_FailedToImportPage, file.getName()), e); 
             }
         }
     }
index d9286b00411355de066600e85be0211c5407da2a..80e8d5b68a7018feee45be4711d333df7ea096ae 100644 (file)
@@ -57,9 +57,9 @@ public class ImportImagesActionFactory implements ActionFactory {
 
     public static Collection<File> requestImportedImages(Shell parentShell) {
         FileDialog dialog = new FileDialog(parentShell, SWT.MULTI);
-        dialog.setText("Choose image to be imported");
-        dialog.setFilterExtensions( new String[] {"*.jpg;*.png;*.gif;*.svg", "*.jpg;*.jpeg", "*.png", "*.gif", "*.svg"} );
-        dialog.setFilterNames( new String[] {"All Images", "JPEG Image", "PNG Image", "GIF Image", "SVG Image"} );
+        dialog.setText(Messages.ImportImagesActionFactory_ChooseImageToBeImported);
+        dialog.setFilterExtensions( new String[] {"*.jpg;*.png;*.gif;*.svg", "*.jpg;*.jpeg", "*.png", "*.gif", "*.svg"} ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+        dialog.setFilterNames( new String[] {Messages.ImportImagesActionFactory_FilterAllImage, Messages.ImportImagesActionFactory_FilterJPEGImage, Messages.ImportImagesActionFactory_FilterPNGImage, Messages.ImportImagesActionFactory_FilterGIFImages, Messages.ImportImagesActionFactory_FilterSVGImage} );
         //dialog.setFilterExtensions( new String[] {"*.jpg", "*.png", "*.gif"} );
         final String filename = dialog.open();
         if (filename == null)
diff --git a/bundles/org.simantics.image.ui/src/org/simantics/image/ui/Messages.java b/bundles/org.simantics.image.ui/src/org/simantics/image/ui/Messages.java
new file mode 100644 (file)
index 0000000..4876911
--- /dev/null
@@ -0,0 +1,21 @@
+package org.simantics.image.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.image.ui.messages"; //$NON-NLS-1$
+       public static String CreateImages_FailedToImportPage;
+       public static String ImportImagesActionFactory_ChooseImageToBeImported;
+       public static String ImportImagesActionFactory_FilterAllImage;
+       public static String ImportImagesActionFactory_FilterGIFImages;
+       public static String ImportImagesActionFactory_FilterJPEGImage;
+       public static String ImportImagesActionFactory_FilterPNGImage;
+       public static String ImportImagesActionFactory_FilterSVGImage;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index 2539dbd70b37d5886a48ef4113c6c6ce9144e039..a9ab8aef6041b8287c468a6656628c5024c46496 100644 (file)
@@ -64,7 +64,7 @@ import com.kitfox.svg.SVGUniverse;
  */
 public class ImageEditor extends ResourceEditorPart {
 
-    public static final String EDITOR_ID   = "org.simantics.wiki.ui.image.editor";
+    public static final String EDITOR_ID   = "org.simantics.wiki.ui.image.editor"; //$NON-NLS-1$
 
     protected boolean          disposed          = false;
 
index d4be8900b6c5baad9b6c2e6400e97e1e9e9d051d..8b12f8eae29bf3091225cb635e6f1e7a00e27fb2 100644 (file)
@@ -36,9 +36,9 @@ public class Activator extends AbstractUIPlugin {
                
         Bundle bundle = context.getBundle();
 
-               IMAGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/image.png"));
-               IMAGES_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/images.png"));
-               ADD_IMAGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/add_image.png"));
+               IMAGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/image.png")); //$NON-NLS-1$
+               IMAGES_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/images.png")); //$NON-NLS-1$
+               ADD_IMAGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/add_image.png")); //$NON-NLS-1$
        }
 
        /*
diff --git a/bundles/org.simantics.image.ui/src/org/simantics/image/ui/messages.properties b/bundles/org.simantics.image.ui/src/org/simantics/image/ui/messages.properties
new file mode 100644 (file)
index 0000000..851ed41
--- /dev/null
@@ -0,0 +1,7 @@
+CreateImages_FailedToImportPage=Failed to import image {0}, see exception for details.\r
+ImportImagesActionFactory_ChooseImageToBeImported=Choose image to be imported\r
+ImportImagesActionFactory_FilterAllImage=All Images\r
+ImportImagesActionFactory_FilterGIFImages=GIF Image\r
+ImportImagesActionFactory_FilterJPEGImage=JPEG Image\r
+ImportImagesActionFactory_FilterPNGImage=PNG Image\r
+ImportImagesActionFactory_FilterSVGImage=SVG Image\r
index ec82fa5beff3371fa6590b22adacd1bbbd5f5806..f656e81411b3a78e83723413bb0faa948eea0aa3 100644 (file)
@@ -45,7 +45,7 @@ public class Image extends ViewpointContributor<ImagesNode> {
 
     @Override
     public String getViewpointId() {
-        return "Standard";
+        return "Standard"; //$NON-NLS-1$
     }
 
     protected Read<Collection<Resource>> getChildRequest(ReadGraph graph, ImagesNode lib) throws DatabaseException {
index 3c0366d2dfc4682a98b39b17ad99143f53e92791..900857339638c8a90ae51f7bcc252919cf96d70a 100644 (file)
@@ -24,7 +24,7 @@ public class ImageLabeler extends LabelerContributor<ImageNode> {
         Layer0 L0 = Layer0.getInstance(graph);
         String name = graph.getPossibleRelatedValue(node.data, L0.HasName, Bindings.STRING);
         if(name == null)
-            name = "No name";
+            name = "No name"; //$NON-NLS-1$
         return name;    
     }
 
index 498b3e0b3ecba309926a1df1c66bec5024a481e7..0d9d91ffb6b3b1c7d55d465088adc4c5df166a2e 100644 (file)
@@ -37,7 +37,7 @@ public class Images extends ViewpointContributor<AbstractNode<Resource>> {
     
     @Override
     public String getViewpointId() {
-        return "Standard";
+        return "Standard"; //$NON-NLS-1$
     }
 
 }
\ No newline at end of file
index 21dc1df64bfb1d4bff938d9861ed50969db04f4d..74f622e91184d10271661ada1660ecdde260aea1 100644 (file)
@@ -19,7 +19,7 @@ public class ImagesLabeler extends LabelerContributor<ImagesNode> {
 
     @Override
     public String getLabel(ReadGraph graph, ImagesNode node) throws DatabaseException {
-        return "Images";
+        return Messages.ImagesLabeler_Images;
     }
 
 }
diff --git a/bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/Messages.java b/bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/Messages.java
new file mode 100644 (file)
index 0000000..f43a5b9
--- /dev/null
@@ -0,0 +1,15 @@
+package org.simantics.image.ui.modelBrowser;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.image.ui.modelBrowser.messages"; //$NON-NLS-1$
+       public static String ImagesLabeler_Images;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
diff --git a/bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/messages.properties b/bundles/org.simantics.image.ui/src/org/simantics/image/ui/modelBrowser/messages.properties
new file mode 100644 (file)
index 0000000..2c1fd4a
--- /dev/null
@@ -0,0 +1 @@
+ImagesLabeler_Images=Images\r
index 9a40b357770090b0563d80bb0ae42514420c7220..8d73a7d2b551644e5c02b595c791c3067367d9b7 100644 (file)
@@ -41,7 +41,7 @@ public class All {
                 final Resource issueSource = ResourceAdaptionUtils.toSingleResource(context);
                 try {
                     VirtualGraphSupport support = Simantics.getSession().getService(VirtualGraphSupport.class);
-                    Simantics.getSession().syncRequest(new WriteRequest(support.getWorkspacePersistent("preferences")) {
+                    Simantics.getSession().syncRequest(new WriteRequest(support.getWorkspacePersistent("preferences")) { //$NON-NLS-1$
                         @Override
                         public void perform(WriteGraph graph) throws DatabaseException {
                                IssueResource ISSUE = IssueResource.getInstance(graph);
index 10de114c780b55a6b2cb1162940fc57d6ecc7053..c845ed08235cdafc51909803c72035277907c194 100644 (file)
@@ -59,7 +59,7 @@ public class IssueImageRule implements ImageRule {
     @Override
     public Map<String, ImageDescriptor> getImage(ReadGraph graph, Object content) throws DatabaseException {
         Variable issue = (Variable) content;
-        String severity = issue.getPossiblePropertyValue(graph, "severity");
+        String severity = issue.getPossiblePropertyValue(graph, "severity"); //$NON-NLS-1$
         if (severity == null)
             return Collections.emptyMap();
         boolean resolved = isResolved(graph, issue);
@@ -71,17 +71,17 @@ public class IssueImageRule implements ImageRule {
         if (issueResource != null)
             return graph.hasStatement(issueResource, IssueResource.getInstance(graph).Resolved);
 
-        Boolean resolved = issue.getPossiblePropertyValue(graph, "resolved");
+        Boolean resolved = issue.getPossiblePropertyValue(graph, "resolved"); //$NON-NLS-1$
         return Boolean.TRUE.equals(resolved);
     }
 
     private ImageDescriptor toImageDescriptor(String severity) {
         switch (severity) {
-        case "Fatal":   return fatal;
-        case "Error":   return error;
-        case "Warning": return warning;
-        case "Info":    return info;
-        case "Note":    return note;
+        case "Fatal":   return fatal; //$NON-NLS-1$
+        case "Error":   return error; //$NON-NLS-1$
+        case "Warning": return warning; //$NON-NLS-1$
+        case "Info":    return info; //$NON-NLS-1$
+        case "Note":    return note; //$NON-NLS-1$
         default:        return help;
         }
     }
index 1d9b1099c5dd84fd9d3139cbd4c6523e9b5499bc..ada862d86b585b5b628847bce8c407bbef986df9 100644 (file)
@@ -25,7 +25,7 @@ public class IssueLabelRule implements LabelRule {
 
     public static final IssueLabelRule INSTANCE = new IssueLabelRule();
 
-    private static final String[] COLS = new String[] { ColumnKeys.SINGLE, "Resource", "Path" };
+    private static final String[] COLS = new String[] { ColumnKeys.SINGLE, Messages.IssueLabelRule_Resource, Messages.IssueLabelRule_Path };
 
     public IssueLabelRule() {
     }
@@ -39,9 +39,9 @@ public class IssueLabelRule implements LabelRule {
     public Map<String,String> getLabel(ReadGraph graph, Object content) throws DatabaseException {
 
         Variable issue = (Variable)content;
-        String description = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "HasDescription") );
-        String resource = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "resource") );
-        String path = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "path") );
+        String description = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "HasDescription") ); //$NON-NLS-1$
+        String resource = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "resource") ); //$NON-NLS-1$
+        String path = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "path") ); //$NON-NLS-1$
 
         String[] result = new String[] { description, resource, path };
         return new ArrayMap<String, String>(COLS, result);
index 162eeff87d5913862e9ff2fa7d5a799c3831dccf..0ced6dff5428708e2447e750c5ad4d3193d6ba4f 100644 (file)
@@ -67,13 +67,13 @@ public class IssueView2 extends ModelledView {
                         private String formName(ReadGraph graph, Resource r) throws DatabaseException {
                             String name = NameUtils.getSafeName(graph, r);
                             final Resource project = Simantics.getProjectResource();
-                            String projectUri = project != null ? graph.getPossibleURI(project) : "";
+                            String projectUri = project != null ? graph.getPossibleURI(project) : ""; //$NON-NLS-1$
                             String uri = graph.getPossibleURI(r);
                             if (uri != null) {
                                 if (uri.startsWith(projectUri))
                                     uri = uri.substring(projectUri.length());
                             }
-                            return uri != null ? name + " (" + uri + ")" : name;
+                            return uri != null ? name + " (" + uri + ")" : name; //$NON-NLS-1$ //$NON-NLS-2$
                         }
 
                         private Resource getConfiguration(ReadGraph graph, Resource r) throws DatabaseException {
@@ -95,7 +95,7 @@ public class IssueView2 extends ModelledView {
             }
             setVisible(true);
         } else {
-            setContentDescription("Issues not available.");
+            setContentDescription(Messages.IssueView2_IssuesNotAvailable);
             setVisible(false);
         }
     }
diff --git a/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/Messages.java b/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/Messages.java
new file mode 100644 (file)
index 0000000..4371be0
--- /dev/null
@@ -0,0 +1,17 @@
+package org.simantics.issues.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.issues.ui.messages"; //$NON-NLS-1$
+       public static String IssueLabelRule_Path;
+       public static String IssueLabelRule_Resource;
+       public static String IssueView2_IssuesNotAvailable;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index b4b27bbf4aeff5c48d6b35839fe09d427fc417cd..0efb4648af12cf574301e66941e7686b99bea68e 100644 (file)
@@ -69,7 +69,7 @@ public class SetSeverityAction implements ActionFactory, ActionFactory2 {
                                        IssueResource ISSUE = IssueResource.getInstance(graph);
                                        graph.deny(resource, ISSUE.Issue_HasSeverity);
                                        graph.claim(resource, ISSUE.Issue_HasSeverity, null, severity);
-                                       Layer0Utils.addCommentMetadata(graph, "Changed severity of " + NameUtils.getSafeLabel(graph, resource) + " to " + NameUtils.getSafeName(graph, severity));      
+                                       Layer0Utils.addCommentMetadata(graph, "Changed severity of " + NameUtils.getSafeLabel(graph, resource) + " to " + NameUtils.getSafeName(graph, severity));       //$NON-NLS-1$ //$NON-NLS-2$
                                }
                        });
                }
index 32e6683dd871f1013f15d8dd2684157fad66b424..dede35358d63742bb450ab026ef3b3029f34f9a0 100644 (file)
@@ -52,9 +52,9 @@ public class SeverityFolderLabelRule implements LabelRule {
         Set<Variable> issues = graph.syncRequest(new IssuesOfSeverity(project, severity));
         
         if(issues.size() > 1) {
-               return Collections.singletonMap(DESCRIPTION, severityName + "s (" + issues.size() + " items)");
+               return Collections.singletonMap(DESCRIPTION, severityName + "s (" + issues.size() + " items)"); //$NON-NLS-1$ //$NON-NLS-2$
         } else {
-               return Collections.singletonMap(DESCRIPTION, severityName + "s (1 item)");
+               return Collections.singletonMap(DESCRIPTION, severityName + "s (1 item)"); //$NON-NLS-1$
         }
         
     }
index cee7c8aefbb123b7ea8b0326cf0a5de7bd57e423..eb78ecc22f2ecd80910da183c1f93d57fd9e9467 100644 (file)
@@ -53,7 +53,7 @@ public enum IssueLabelDecorationRule implements LabelDecorationRule {
             user = graph.hasStatement(issueR, ISSUE.UserIssue);
             resolved = graph.hasStatement(issueR, ISSUE.Resolved);
         } else {
-            hidden = Boolean.TRUE.equals(issue.getPossiblePropertyValue(graph, "hidden", Bindings.BOOLEAN));
+            hidden = Boolean.TRUE.equals(issue.getPossiblePropertyValue(graph, "hidden", Bindings.BOOLEAN)); //$NON-NLS-1$
         }
 
         int index = (hidden ? 1 : 0) + (user ? 2 : 0) + (resolved ? 4 : 0);
index e4d09e011a304f92d7ee97916977d2132f5e70e4..b168583e4e0fb1cb8bfb9cccfe412e14fb9f1887 100644 (file)
@@ -99,8 +99,8 @@ public class ConfigureIssueSources extends AbstractHandler {
         Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
          ListDialog<IssueSourceEntry> dialog = new ListDialog<IssueSourceEntry>(
                  shell, sources,
-                 "Select available issue sources",
-                 "Selected sources will be used and existing deselected sources will be removed.") {
+                 Messages.ConfigureIssueSources_SelectAvailableIssueSources,
+                 Messages.ConfigureIssueSources_SelectedSourcesAddRemoveMsg) {
                 
                    protected CheckboxTableViewer createViewer(Composite composite) {
                        CheckboxTableViewer viewer = CheckboxTableViewer.newCheckList(
index 6659a5227ccff3635b46ee173e2c5087f49c7c44..dc7b26a24ad0f8c25f7d2e60a71d351492960ae2 100644 (file)
@@ -58,7 +58,7 @@ import org.simantics.utils.ui.ExceptionUtils;
  */
 public class ExportIssuesAsCsv extends AbstractHandler {
 
-    private static final String PROP_LAST_VALIDATION_REPORT_PATH= "validation.report.path";
+    private static final String PROP_LAST_VALIDATION_REPORT_PATH= "validation.report.path"; //$NON-NLS-1$
 
     @Override
     public Object execute(ExecutionEvent event) throws ExecutionException {
@@ -81,9 +81,9 @@ public class ExportIssuesAsCsv extends AbstractHandler {
                 Layer0X L0X = Layer0X.getInstance(graph);
                 SimulationResource SIMU = SimulationResource.getInstance(graph);
                 for (Resource model : graph.syncRequest(new ObjectsWithType(Simantics.getProjectResource(), L0X.Activates, SIMU.Model))) {
-                    return NameUtils.getSafeName(graph, model) + ".txt";
+                    return NameUtils.getSafeName(graph, model) + ".txt"; //$NON-NLS-1$
                 }
-                return "issues.txt";
+                return "issues.txt"; //$NON-NLS-1$
             }
         });
 
@@ -105,9 +105,9 @@ public class ExportIssuesAsCsv extends AbstractHandler {
         final DataContainer<PrintStream> externalOutput = new DataContainer<PrintStream>();
 
         FileDialog fd = new FileDialog(parentShell, SWT.SAVE);
-        fd.setText("Select Validation Output");
-        fd.setFilterExtensions(new String[] { "*.txt", "*.*" });
-        fd.setFilterNames(new String[] { "Comma-Separated Values (*.txt)", "All Files (*.*)" });
+        fd.setText(Messages.ExportIssuesAsCsv_SelectValidationOutput);
+        fd.setFilterExtensions(new String[] { "*.txt", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$
+        fd.setFilterNames(new String[] { Messages.ExportIssuesAsCsv_CommaSeparatedValues, Messages.ExportIssuesAsCsv_AllFiles });
         if (lastReportPath != null)
             fd.setFilterPath(lastReportPath);
         fd.setFileName(fileName);
@@ -141,12 +141,12 @@ public class ExportIssuesAsCsv extends AbstractHandler {
     }
 
     private void export(IProgressMonitor monitor, PrintStream out) throws DatabaseException {
-        SubMonitor progress = SubMonitor.convert(monitor, "Export issues", IProgressMonitor.UNKNOWN);
+        SubMonitor progress = SubMonitor.convert(monitor, Messages.ExportIssuesAsCsv_ExportIssues, IProgressMonitor.UNKNOWN);
         Simantics.getSession().syncRequest(new ReadRequest() {
             @Override
             public void run(ReadGraph graph) throws DatabaseException {
                 Collection<Variable> activeIssues = graph.syncRequest(new AllVisibleIssues(Simantics.getProjectResource()));
-                out.println("# Exported issues (" + activeIssues.size() + ")");
+                out.println("# Exported issues (" + activeIssues.size() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
                 for (Variable issue : activeIssues) {
                     exportIssue(graph, issue, out, 0);
                     progress.worked(1);
@@ -156,7 +156,7 @@ public class ExportIssuesAsCsv extends AbstractHandler {
                         graph.syncRequest(new DynamicIssueSources(Simantics.getProjectResource())));
                 if (!dynamicIssueSources.isEmpty()) {
                     out.println();
-                    out.println("# Dynamic Issues");
+                    out.println("# Dynamic Issues"); //$NON-NLS-1$
                     for (Variable source : dynamicIssueSources.values()) {
                         exportDynamicIssueSource(progress, graph, source, out, 0);
                     }
@@ -168,7 +168,7 @@ public class ExportIssuesAsCsv extends AbstractHandler {
     private Map<String, Variable> nameMap(ReadGraph graph, Set<Variable> sources) throws DatabaseException {
         TreeMap<String, Variable> sorted = new TreeMap<>();
         for (Variable v : sources) {
-            String name = v.getPossiblePropertyValue(graph, "HasDescription", Bindings.STRING);
+            String name = v.getPossiblePropertyValue(graph, "HasDescription", Bindings.STRING); //$NON-NLS-1$
             if (name == null)
                 name = v.getName(graph);
             sorted.put(name, v);
@@ -185,13 +185,13 @@ public class ExportIssuesAsCsv extends AbstractHandler {
     }
 
     private void exportIssue(ReadGraph graph, Variable issue, PrintStream out, int startColumn) throws DatabaseException {
-        String description = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "HasDescription") );
-        String severity = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "severity") );
-        String resource = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "resource") );
-        String path = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "path") );
+        String description = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "HasDescription") ); //$NON-NLS-1$
+        String severity = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "severity") ); //$NON-NLS-1$
+        String resource = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "resource") ); //$NON-NLS-1$
+        String path = StringUtils.safeString( (String) issue.getPossiblePropertyValue(graph, "path") ); //$NON-NLS-1$
         for (int i = 0; i < startColumn; ++i)
-            out.print(";");
-        out.println(description + ";" + severity + ";" + resource + ";" + path);
+            out.print(";"); //$NON-NLS-1$
+        out.println(description + ";" + severity + ";" + resource + ";" + path); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
     }
 
 }
\ No newline at end of file
index 38b2c93e285ee4abaa5c4348e4e682851bdcf5a0..50251754f3d6d1e33c0b9b6d7626483ec3ea222f 100644 (file)
@@ -63,14 +63,14 @@ class FunctionHandler extends PreferenceHandler {
         }
         if (!hiders.isEmpty()) {
             SCLContext ctx = SCLContext.getCurrent();
-            Object oldGraph = ctx.put("graph", graph);
+            Object oldGraph = ctx.put("graph", graph); //$NON-NLS-1$
             try {
                 for (Function f : hiders)
                     f.apply(argument);
             } catch (Throwable t) {
                 throw new DatabaseException(t);
             } finally {
-                ctx.put("graph", oldGraph);
+                ctx.put("graph", oldGraph); //$NON-NLS-1$
             }
         }
     }
index ebdb5a4b2d3d63a90d9ec8075661b78ba048d346..6f6c427af85441049169263f674f89529d20acf0 100644 (file)
@@ -33,7 +33,7 @@ public class Help implements ActionFactory {
                if (target instanceof Variable) {
                        return () -> {
                                try {
-                                       String id = Simantics.sync(new PossibleVariablePropertyValue<String>((Variable) target, "contextualHelpId", Bindings.STRING));
+                                       String id = Simantics.sync(new PossibleVariablePropertyValue<String>((Variable) target, "contextualHelpId", Bindings.STRING)); //$NON-NLS-1$
                                        if (id == null) {
                                                PlatformUI.getWorkbench().getHelpSystem().displayDynamicHelp();
                                                return;
index 299b71346609bcc74f7f1fd3dfbd094736f24852..b7861301051556d64ba881db354577bd6e7763e1 100644 (file)
@@ -18,7 +18,7 @@ package org.simantics.issues.ui.handler;
 public class Hide extends FunctionHandler {
 
     public Hide() {
-        super(null, "hider", Boolean.TRUE);
+        super(null, "hider", Boolean.TRUE); //$NON-NLS-1$
     }
 
 }
index b607eb7e1b065602aa0c0250599ad940b67445a4..7969b5d026adff7c2d37effe4e368d556a7dbeaa 100644 (file)
@@ -116,19 +116,19 @@ public class MenuActions extends DynamicMenuContribution {
     }
 
     private IAction unhideAction(List<Resource> input) {
-        return tagAction("Unhide", Activator.UNHIDE_ICON, IssueResource.URIs.Hidden, false, input);
+        return tagAction(Messages.MenuActions_Unhide, Activator.UNHIDE_ICON, IssueResource.URIs.Hidden, false, input);
     }
 
     private IAction hideAction(List<Resource> input) {
-        return tagAction("Hide", Activator.HIDE_ICON, IssueResource.URIs.Hidden, true, input);
+        return tagAction(Messages.MenuActions_Hide, Activator.HIDE_ICON, IssueResource.URIs.Hidden, true, input);
     }
 
     private IAction resolveAction(List<Resource> input) {
-        return tagAction("Mark Resolved", Activator.RESOLVE_ICON, IssueResource.URIs.Resolved, true, input);
+        return tagAction(Messages.MenuActions_MarkResolved, Activator.RESOLVE_ICON, IssueResource.URIs.Resolved, true, input);
     }
 
     private IAction unresolveAction(List<Resource> input) {
-        return tagAction("Mark Unresolved", Activator.UNRESOLVE_ICON, IssueResource.URIs.Resolved, false, input);
+        return tagAction(Messages.MenuActions_MarkUnresolved, Activator.UNRESOLVE_ICON, IssueResource.URIs.Resolved, false, input);
     }
 
     private IAction tagAction(String label, ImageDescriptor image, String tagURI, boolean tag, List<Resource> input) {
@@ -141,7 +141,7 @@ public class MenuActions extends DynamicMenuContribution {
             @Override
             public void fill(Menu menu, int index) {
                 MenuItem setSeverityItem = new MenuItem(menu, SWT.CASCADE);
-                setSeverityItem.setText("Set Severity");
+                setSeverityItem.setText(Messages.MenuActions_SetSeverity);
                 Menu setSeverity = new Menu(menu);
                 setSeverityItem.setMenu(setSeverity);
                 for (final Severity sev : Severity.values()) {
@@ -150,7 +150,7 @@ public class MenuActions extends DynamicMenuContribution {
 
                     MenuItem item = new MenuItem(setSeverity, SWT.PUSH);
                     item.setText(sev.toString().toLowerCase());
-                    item.setImage(Activator.getDefault().getImageRegistry().get(sev.toString() + "-full"));
+                    item.setImage(Activator.getDefault().getImageRegistry().get(sev.toString() + "-full")); //$NON-NLS-1$
                     item.addSelectionListener(new SelectionAdapter() {
                         @Override
                         public void widgetSelected(SelectionEvent e) {
diff --git a/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/Messages.java b/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/Messages.java
new file mode 100644 (file)
index 0000000..1d98e75
--- /dev/null
@@ -0,0 +1,32 @@
+package org.simantics.issues.ui.handler;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.issues.ui.handler.messages"; //$NON-NLS-1$
+       public static String ConfigureIssueSources_SelectAvailableIssueSources;
+       public static String ConfigureIssueSources_SelectedSourcesAddRemoveMsg;
+       public static String ExportIssuesAsCsv_AllFiles;
+       public static String ExportIssuesAsCsv_CommaSeparatedValues;
+       public static String ExportIssuesAsCsv_ExportIssues;
+       public static String ExportIssuesAsCsv_SelectValidationOutput;
+       public static String MenuActions_Hide;
+       public static String MenuActions_MarkResolved;
+       public static String MenuActions_MarkUnresolved;
+       public static String MenuActions_SetSeverity;
+       public static String MenuActions_Unhide;
+       public static String PurgeResolvedIssues_MonitorPurgingResolvedIssues;
+       public static String PurgeResolvedIssues_PurgedResolvedBatchIssues;
+       public static String PurgeResolvedIssues_PurgingResolvedBatchIssues;
+       public static String RunActiveValidations_MonitorPreparingResourcesForValidation;
+       public static String RunActiveValidations_ValidateModel;
+       public static String RunActiveValidations_Validation;
+       public static String RunActiveValidations_ValidationPreparation;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index 633c8d96dd46b7136634c773146d5a37906da396..1890228f40193324d7538433beadc81dae684f3a 100644 (file)
@@ -41,7 +41,7 @@ public class NewUserIssue extends AbstractHandler {
                 public void perform(WriteGraph graph) throws DatabaseException {
                     graph.markUndoPoint();
                     Resource issue = IssueUtils.newUserIssueForModel(graph);
-                    Layer0Utils.addCommentMetadata(graph, "Created new User Issue " + NameUtils.getSafeLabel(graph, issue) + " " + issue.toString());
+                    Layer0Utils.addCommentMetadata(graph, "Created new User Issue " + NameUtils.getSafeLabel(graph, issue) + " " + issue.toString()); //$NON-NLS-1$ //$NON-NLS-2$
                 }
             });
         } catch (DatabaseException e) {
index 20a343938b804c23691e7c80386c1521584a1080..8840406d5735a9340a5ccb61dcdc2a800c8753ce 100644 (file)
@@ -52,11 +52,11 @@ class PreferenceHandler extends AbstractHandler implements IElementUpdater, Acti
     private final boolean  tag;
 
     public PreferenceHandler() {
-        this("preferences", null, false);
+        this("preferences", null, false); //$NON-NLS-1$
     }
 
     public PreferenceHandler(String tagURI, boolean tag) {
-        this("preferences", tagURI, tag);
+        this("preferences", tagURI, tag); //$NON-NLS-1$
     }
 
     public PreferenceHandler(String virtualGraphId) {
index 90eded9ba876531f7ae3cdf97e712a459d84e584..862b475738050f3a31e76d5cbbd14ee4681c346a 100644 (file)
@@ -22,6 +22,7 @@ import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.PlatformUI;
 import org.simantics.Simantics;
 import org.simantics.browsing.ui.common.ErrorLogger;
@@ -71,15 +72,15 @@ public class PurgeResolvedIssues extends AbstractHandler {
         if (project == null)
             return;
 
-        final SubMonitor mon = SubMonitor.convert(monitor, "Purging resolved issues...", 100);
+        final SubMonitor mon = SubMonitor.convert(monitor, Messages.PurgeResolvedIssues_MonitorPurgingResolvedIssues, 100);
 
         session.syncRequest(new DelayedWriteRequest() {
             @Override
             public void perform(WriteGraph graph) throws DatabaseException {
                 graph.markUndoPoint();
                 IssueResource ISSUE = IssueResource.getInstance(graph);
-                Set<Resource> toBeRemoved = new HashSet<Resource>();
-                Map<Resource, Boolean> sourceIsContinuous = new THashMap<Resource, Boolean>(); 
+                Set<Resource> toBeRemoved = new HashSet<>();
+                Map<Resource, Boolean> sourceIsContinuous = new THashMap<>();
                 for (Resource activeIssue : graph.syncRequest(new AllActiveIssues(project))) {
                     if (graph.hasStatement(activeIssue, ISSUE.Resolved)) {
                         Resource managedBy = graph.getPossibleObject(activeIssue, ISSUE.IssueSource_Manages_Inverse);
@@ -96,12 +97,12 @@ public class PurgeResolvedIssues extends AbstractHandler {
                     }
                 }
 
-                mon.setTaskName("Purging " + toBeRemoved.size() + " resolved batch issues...");
+                mon.setTaskName(NLS.bind(Messages.PurgeResolvedIssues_PurgingResolvedBatchIssues, toBeRemoved.size()));
                 mon.setWorkRemaining(toBeRemoved.size());
                 StringBuilder sb = new StringBuilder();
-                sb.append("Purged " + toBeRemoved.size() + " resolved batch issue(s)");
+                sb.append(NLS.bind(Messages.PurgeResolvedIssues_PurgedResolvedBatchIssues, toBeRemoved.size()));
                 for (Resource remove : toBeRemoved) {
-                    //sb.append(NameUtils.getSafeLabel(graph, remove) + " ");
+                    // sb.append(NameUtils.getSafeLabel(graph, remove) + " ");
                     RemoverUtil.remove(graph, remove);
                     mon.worked(1);
                 }
index 803324613a1501045a4ed7973c9cb70d413df8e5..e46be60d4805e47c5b7c240fc1aa46f5a8e16a08 100644 (file)
@@ -71,7 +71,7 @@ public class RunActiveValidations extends AbstractHandler {
         final BatchIssueValidationContext context = new BatchIssueValidationContext();
 
         try {
-            SleepingDatabaseJob dbLock = new SleepingDatabaseJob("Validation Preparation").scheduleAndWaitForRunning();
+            SleepingDatabaseJob dbLock = new SleepingDatabaseJob(Messages.RunActiveValidations_ValidationPreparation).scheduleAndWaitForRunning();
             try {
                 PlatformUI.getWorkbench().getProgressService().run(true, true, new IRunnableWithProgress() {
                     @Override
@@ -84,7 +84,7 @@ public class RunActiveValidations extends AbstractHandler {
                                     session.syncRequest(new SelectedModelBatchIssueSources(model)),
                                     validations);
 
-                            SubMonitor.convert(monitor, "Preparing resources for validation", 100);
+                            SubMonitor.convert(monitor, Messages.RunActiveValidations_MonitorPreparingResourcesForValidation, 100);
                             context.contexts = Collections.singletonList(model);
                             context.domain = ModelTransferableGraphSourceRequest.getDomainOnly(session, monitor, model);
 
@@ -126,7 +126,7 @@ public class RunActiveValidations extends AbstractHandler {
 
     public static void run(Runnable postValidation, final Collection<BatchIssueSource> validations, final BatchIssueValidationContext context) {
         // Run the validations for the selected composites
-        SleepingDatabaseJob dbLock = new SleepingDatabaseJob("Validation");
+        SleepingDatabaseJob dbLock = new SleepingDatabaseJob(Messages.RunActiveValidations_Validation);
         try {
             dbLock.scheduleAndWaitForRunning();
             try {
@@ -134,7 +134,7 @@ public class RunActiveValidations extends AbstractHandler {
                     @Override
                     public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                         try {
-                            SubMonitor progress = SubMonitor.convert(monitor, "Validate Model", 100);
+                            SubMonitor progress = SubMonitor.convert(monitor, Messages.RunActiveValidations_ValidateModel, 100);
                             int maxWrittenIssues = IssuePreferenceUtil.getPreferences().maxBatchIssuesToWrite;
                             int writtenIssues = 0;
                             for (BatchIssueSource source : validations) {
index 24918c1fb1787c30b850b4ca94e7846d1268e9fa..1a2457b1c6c5e2c2ff47e75745f196f743eb9262 100644 (file)
@@ -18,7 +18,7 @@ package org.simantics.issues.ui.handler;
 public class Unhide extends FunctionHandler {
 
     public Unhide() {
-        super(null, "hider", Boolean.FALSE);
+        super(null, "hider", Boolean.FALSE); //$NON-NLS-1$
     }
 
 }
diff --git a/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/messages.properties b/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/handler/messages.properties
new file mode 100644 (file)
index 0000000..527e67a
--- /dev/null
@@ -0,0 +1,18 @@
+ConfigureIssueSources_SelectAvailableIssueSources=Select available issue sources\r
+ConfigureIssueSources_SelectedSourcesAddRemoveMsg=Selected sources will be used and existing deselected sources will be removed.\r
+ExportIssuesAsCsv_AllFiles=All Files (*.*)\r
+ExportIssuesAsCsv_CommaSeparatedValues=Comma-Separated Values (*.txt)\r
+ExportIssuesAsCsv_ExportIssues=Export issues\r
+ExportIssuesAsCsv_SelectValidationOutput=Select Validation Output\r
+MenuActions_Hide=Hide\r
+MenuActions_MarkResolved=Mark Resolved\r
+MenuActions_MarkUnresolved=Mark Unresolved\r
+MenuActions_SetSeverity=Set Severity\r
+MenuActions_Unhide=Unhide\r
+PurgeResolvedIssues_MonitorPurgingResolvedIssues=Purging resolved issues...\r
+PurgeResolvedIssues_PurgedResolvedBatchIssues=Purged {0} resolved batch issue(s)\r
+PurgeResolvedIssues_PurgingResolvedBatchIssues=Purging {0} resolved batch issues...\r
+RunActiveValidations_MonitorPreparingResourcesForValidation=Preparing resources for validation\r
+RunActiveValidations_ValidateModel=Validate Model\r
+RunActiveValidations_Validation=Validation\r
+RunActiveValidations_ValidationPreparation=Validation Preparation\r
index 790c0047198c3e2d66b9d2bd682088855bc6a565..17ac9c5c7da8437f146dd8360e7b76da912ce1d5 100644 (file)
@@ -26,7 +26,7 @@ import org.simantics.utils.ui.gfx.HSVAdjustmentImageDescriptor;
 
 public class Activator extends AbstractUIPlugin {
 
-    public static final String PLUGIN_ID = "org.simantics.issues.ui";
+    public static final String PLUGIN_ID = "org.simantics.issues.ui"; //$NON-NLS-1$
     
     static Activator instance;
     ServiceTracker   messageScheme;
@@ -59,29 +59,29 @@ public class Activator extends AbstractUIPlugin {
 
         Bundle bundle = context.getBundle();
 
-        HIDE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/hide.png"));
+        HIDE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/hide.png")); //$NON-NLS-1$
         UNHIDE_ICON = AlphaAdjustmentImageDescriptor.adjustAlpha(HSVAdjustmentImageDescriptor.adjust(
                 HIDE_ICON, 0f, 0f, 1f), 96);
         //RESOLVE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/lightbulb.png"));
         //UNRESOLVE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/lightbulb_off.png"));
-        RESOLVE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tick.png"));
+        RESOLVE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/tick.png")); //$NON-NLS-1$
         UNRESOLVE_ICON = AlphaAdjustmentImageDescriptor.adjustAlpha(HSVAdjustmentImageDescriptor.adjust(
                 RESOLVE_ICON, 0f, 0f, 1f), 96);
 
-        PURGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/purge.gif"));
+        PURGE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/purge.gif")); //$NON-NLS-1$
 
-        FATAL_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/fatal.png"));
-        ERROR_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/error.png"));
-        WARNING_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/warning.png"));
-        INFO_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/information.png"));
-        NOTE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/note.png"));
-        OK_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/noissue.png"));
+        FATAL_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/fatal.png")); //$NON-NLS-1$
+        ERROR_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/error.png")); //$NON-NLS-1$
+        WARNING_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/warning.png")); //$NON-NLS-1$
+        INFO_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/information.png")); //$NON-NLS-1$
+        NOTE_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/note.png")); //$NON-NLS-1$
+        OK_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/noissue.png")); //$NON-NLS-1$
 
-        FATAL_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/fatal_decoration.png"));
-        ERROR_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/error_decoration.png"));
-        WARNING_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/warning_decoration.png"));
-        INFO_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/information_decoration.png"));
-        NOTE_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/note_decoration.png"));
+        FATAL_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/fatal_decoration.png")); //$NON-NLS-1$
+        ERROR_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/error_decoration.png")); //$NON-NLS-1$
+        WARNING_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/warning_decoration.png")); //$NON-NLS-1$
+        INFO_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/information_decoration.png")); //$NON-NLS-1$
+        NOTE_DECORATION_ICON = ImageDescriptor.createFromURL(bundle.getResource("icons/note_decoration.png")); //$NON-NLS-1$
     }
 
     @Override
@@ -91,11 +91,11 @@ public class Activator extends AbstractUIPlugin {
 
     @Override
     protected void initializeImageRegistry(ImageRegistry reg) {
-        reg.put(Severity.FATAL.toString()+"-full", FATAL_ICON);
-        reg.put(Severity.ERROR.toString()+"-full", ERROR_ICON);
-        reg.put(Severity.WARNING.toString()+"-full", WARNING_ICON);
-        reg.put(Severity.INFO.toString()+"-full", INFO_ICON);
-        reg.put(Severity.NOTE.toString()+"-full", NOTE_ICON);
+        reg.put(Severity.FATAL.toString()+"-full", FATAL_ICON); //$NON-NLS-1$
+        reg.put(Severity.ERROR.toString()+"-full", ERROR_ICON); //$NON-NLS-1$
+        reg.put(Severity.WARNING.toString()+"-full", WARNING_ICON); //$NON-NLS-1$
+        reg.put(Severity.INFO.toString()+"-full", INFO_ICON); //$NON-NLS-1$
+        reg.put(Severity.NOTE.toString()+"-full", NOTE_ICON); //$NON-NLS-1$
         reg.put(Severity.FATAL.toString(), FATAL_DECORATION_ICON);
         reg.put(Severity.ERROR.toString(), ERROR_DECORATION_ICON);
         reg.put(Severity.WARNING.toString(), WARNING_DECORATION_ICON);
@@ -125,7 +125,7 @@ public class Activator extends AbstractUIPlugin {
 
     public static URL getDefaultResource(String name) {
         Activator plugin = getDefault();
-        if(plugin == null) throw new IllegalStateException("The plugin is not active.");
+        if(plugin == null) throw new IllegalStateException("The plugin is not active."); //$NON-NLS-1$
         Bundle bundle = plugin.getBundle(); 
         return bundle.getResource(name);
     }
diff --git a/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/messages.properties b/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/messages.properties
new file mode 100644 (file)
index 0000000..5028434
--- /dev/null
@@ -0,0 +1,3 @@
+IssueLabelRule_Path=Path\r
+IssueLabelRule_Resource=Resource\r
+IssueView2_IssuesNotAvailable=Issues not available.\r
index 577c06b7b5ac4b5330d5c18c37adba060e95b308..06345506e51e1a33632ab1e7e5f72e24b4d337c2 100644 (file)
@@ -32,14 +32,14 @@ public class IssuePreferencePage extends FieldEditorPreferencePage implements IW
 
     @Override
     protected IPreferenceStore doGetPreferenceStore() {
-        return new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.simantics.issues");
+        return new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.simantics.issues"); //$NON-NLS-1$
     }
 
     @Override
     protected void createFieldEditors() {
         //addField(new BooleanFieldEditor(IssuePreferences.P_ISSUES_ENABLED, "Issue searching &enabled (only takes effect after restart)", getFieldEditorParent()));
-        IntegerFieldEditor f = new IntegerFieldEditor(IssuePreferences.P_MAX_BATCH_ISSUES_TO_WRITE, "Maximum batch validation issues to write", getFieldEditorParent());
-        f.getLabelControl(getFieldEditorParent()).setToolTipText("Limit for amount of batch validation issue results to write into the database");
+        IntegerFieldEditor f = new IntegerFieldEditor(IssuePreferences.P_MAX_BATCH_ISSUES_TO_WRITE, Messages.IssuePreferencePage_MaximumBatchValidationIssues, getFieldEditorParent());
+        f.getLabelControl(getFieldEditorParent()).setToolTipText(Messages.IssuePreferencePage_LimitforAmountOfBatchValidation);
         addField(f);
     }
 
diff --git a/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/preferences/Messages.java b/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/preferences/Messages.java
new file mode 100644 (file)
index 0000000..aa75978
--- /dev/null
@@ -0,0 +1,16 @@
+package org.simantics.issues.ui.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.issues.ui.preferences.messages"; //$NON-NLS-1$
+       public static String IssuePreferencePage_LimitforAmountOfBatchValidation;
+       public static String IssuePreferencePage_MaximumBatchValidationIssues;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
diff --git a/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/preferences/messages.properties b/bundles/org.simantics.issues.ui/src/org/simantics/issues/ui/preferences/messages.properties
new file mode 100644 (file)
index 0000000..5758b69
--- /dev/null
@@ -0,0 +1,2 @@
+IssuePreferencePage_LimitforAmountOfBatchValidation=Limit for amount of batch validation issue results to write into the database\r
+IssuePreferencePage_MaximumBatchValidationIssues=Maximum batch validation issues to write\r
diff --git a/bundles/org.simantics.logging.ui/src/org/simantics/logging/ui/handlers/Messages.java b/bundles/org.simantics.logging.ui/src/org/simantics/logging/ui/handlers/Messages.java
new file mode 100644 (file)
index 0000000..7e3d488
--- /dev/null
@@ -0,0 +1,16 @@
+package org.simantics.logging.ui.handlers;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.logging.ui.handlers.messages"; //$NON-NLS-1$
+       public static String SaveLogFilesHandler_FilterAllFiles;
+       public static String SaveLogFilesHandler_FilterZipArchive;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index dd62805009376c1554c95e4a908828b820a7f793..8457ca5a87b2f8936370a2134fefe271f16e5345 100644 (file)
@@ -19,9 +19,9 @@ public class SaveLogFilesHandler {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(SaveLogFilesHandler.class);
 
-    private static final String[] FILTER_NAMES = { "ZIP-archive", "AllFiles (*.*)" };
-    private static final String[] FILTER_EXTENSIONS = { "*.zip", "*.*" };
-    private static final String USER_HOME = System.getProperty("user.home");
+    private static final String[] FILTER_NAMES = { Messages.SaveLogFilesHandler_FilterZipArchive, Messages.SaveLogFilesHandler_FilterAllFiles };
+    private static final String[] FILTER_EXTENSIONS = { "*.zip", "*.*" }; //$NON-NLS-1$ //$NON-NLS-2$
+    private static final String USER_HOME = System.getProperty("user.home"); //$NON-NLS-1$
 
     @Execute
     public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell) {
@@ -39,16 +39,16 @@ public class SaveLogFilesHandler {
         String destination = dialog.open();
         if (destination != null) {
             if (LOGGER.isDebugEnabled())
-                LOGGER.debug("Destination for saving log files is {}", destination);
+                LOGGER.debug("Destination for saving log files is {}", destination); //$NON-NLS-1$
             try {
                 LogCollector.archiveLogs(destination);
             } catch (Throwable t) {
-                LOGGER.error("Could not save log files to ZIP", t);
-                ExceptionUtils.logAndShowError("Could not save log files to ZIP", t);
+                LOGGER.error("Could not save log files to ZIP", t); //$NON-NLS-1$
+                ExceptionUtils.logAndShowError("Could not save log files to ZIP", t); //$NON-NLS-1$
             }
         } else {
             if (LOGGER.isDebugEnabled()) {
-                LOGGER.debug("No destination selected for saving logs");
+                LOGGER.debug("No destination selected for saving logs"); //$NON-NLS-1$
             }
         }
     }
index 27473f182736b46a69af479c382257c0957f1cea..9b350829dd5cf92f13706f630d5516263b7791d0 100644 (file)
@@ -14,7 +14,7 @@ public class SelectLoggingLevelHandler {
     @Execute
     public void execute(@Named("org.simantics.logging.ui.commandparameter.selectLoggingLevel") String level) {
         if (LOGGER.isDebugEnabled())
-            LOGGER.debug("Setting logging level to {}", level);
+            LOGGER.debug("Setting logging level to {}", level); //$NON-NLS-1$
         LogConfigurator.setLoggingLevel(level);
     }
 
diff --git a/bundles/org.simantics.logging.ui/src/org/simantics/logging/ui/handlers/messages.properties b/bundles/org.simantics.logging.ui/src/org/simantics/logging/ui/handlers/messages.properties
new file mode 100644 (file)
index 0000000..bee99a5
--- /dev/null
@@ -0,0 +1,2 @@
+SaveLogFilesHandler_FilterAllFiles=AllFiles (*.*)\r
+SaveLogFilesHandler_FilterZipArchive=ZIP-archive\r
index 2cc795dd09be2b14d137b8d7380fd918d2c3c2ce..a2343cd8562ff4dd274fb9372a9a57f17baa5372 100644 (file)
@@ -22,7 +22,7 @@ import org.osgi.framework.BundleContext;
 public class Activator extends AbstractUIPlugin {
 
        // The plug-in ID
-       public static final String PLUGIN_ID = "org.simantics.message.ui";
+       public static final String PLUGIN_ID = "org.simantics.message.ui"; //$NON-NLS-1$
 
        // The shared instance
        private static Activator plugin;
index 7c3a330670a2bb1a5fb01881edc36045bc481eb5..9319a38d5dda30e0c1e36394b92adaaae458a0bb 100644 (file)
@@ -384,12 +384,12 @@ public class EventDetailsDialog extends TrayDialog {
 
                                if (stack != null) {
                                        stack = filterStack(stack);
-                                       detailsText.setText("<pre>" + stack + "</pre>");                
+                                       detailsText.setText("<pre>" + stack + "</pre>"); //$NON-NLS-1$ //$NON-NLS-2$
                                        detailsTextDescription.setText(Messages.EventDetailsDialog_exception);
                                } else {
-                                       detailsText.setText("<pre>" + Messages.EventDetailsDialog_noDetailedMessage + "</pre>");
-                               }                               
-                       }               
+                                       detailsText.setText("<pre>" + Messages.EventDetailsDialog_noDetailedMessage + "</pre>"); //$NON-NLS-1$ //$NON-NLS-2$
+                               }
+                       }
 
                        LogSession logSession = logEntry.getSession();
                        String session = logSession != null ? logSession.getSessionData() : null;
@@ -768,7 +768,7 @@ public class EventDetailsDialog extends TrayDialog {
                    public void changing(LocationEvent event) {
                        //System.out.println("changing: " + event);
                        String location = event.location;
-                       if ("about:blank".equals(location)) {
+                       if ("about:blank".equals(location)) { //$NON-NLS-1$
                            event.doit = true;
                        } else {
                            event.doit = false;
index b71cb3cded05f7de514060b789014186e9bb71d7..a9d685be387c9e358ecc861f3a0fe5d095c9a13c 100644 (file)
@@ -361,7 +361,7 @@ public class LogView extends ViewPart implements ILogListener {
                */
                fMessageDescription = new Browser(sashForm, SWT.NONE);
                fMessageDescription.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
-               fMessageDescription.setText("<html><head></head><body><p>Select a message to show its description here.</p></body></html>");
+               fMessageDescription.setText("<html><head></head><body><p>Select a message to show its description here.</p></body></html>"); //$NON-NLS-1$
                fMessageDescription.addLocationListener(new LocationListener() {
                    @Override
                    public void changed(LocationEvent event) {
@@ -371,7 +371,7 @@ public class LogView extends ViewPart implements ILogListener {
                    public void changing(LocationEvent event) {
                        //System.out.println("changing: " + event);
                        String location = event.location;
-                       if ("about:blank".equals(location)) {
+                       if ("about:blank".equals(location)) { //$NON-NLS-1$
                            event.doit = true;
                        } else {
                            event.doit = false;
@@ -413,7 +413,7 @@ public class LogView extends ViewPart implements ILogListener {
                 IStructuredSelection s = (IStructuredSelection) event.getSelection();
                 if (s.isEmpty()) {
                     //fMessageDescription.setText("Select a message to show its description here.", false, false);
-                    fMessageDescription.setText("<html><head></head><body><pre>Select a message to show its description here.</pre></body></html>");
+                    fMessageDescription.setText("<html><head></head><body><pre>Select a message to show its description here.</pre></body></html>"); //$NON-NLS-1$
                 } else {
                     AbstractEntry entry = (AbstractEntry) s.getFirstElement();
                     if (entry instanceof LogEntry) {
@@ -427,11 +427,7 @@ public class LogView extends ViewPart implements ILogListener {
                         // truncation enables us to show even lengthy messages.
                         if (msg.length() > Short.MAX_VALUE) {
                             StringBuilder truncated = new StringBuilder();
-                            truncated.append("... [truncated ");
-                            truncated.append(msg.length() - (Short.MAX_VALUE - 100));
-                            truncated.append(" out of ");
-                            truncated.append(msg.length());
-                            truncated.append(" characters]");
+                            truncated.append( NLS.bind(Messages.LogView_Truncated, msg.length() - (Short.MAX_VALUE - 100), msg.length()));                            
                             msg = msg.substring(0, Short.MAX_VALUE - 100) + truncated;
                         }
                         try {
@@ -596,11 +592,11 @@ public class LogView extends ViewPart implements ILogListener {
 
     @SuppressWarnings("unused")
     private Action createTestAction() {
-        Action action = new Action("Test") {
+        Action action = new Action("Test") { //$NON-NLS-1$
             public void run() {
-                IStatus s1 = new Status(IStatus.INFO, Activator.PLUGIN_ID, "Test message 1", null); 
-                IStatus s2 = new Status(IStatus.WARNING, Activator.PLUGIN_ID, "Test message 2", null); 
-                IStatus s3 = new DetailStatus(IStatus.ERROR, Activator.PLUGIN_ID, "This is the short message.", HtmlUtil.p("A multi-lined message...\n<br/>continuing...<br/><br/>still...<br/>Error occurred, report at " + HtmlUtil.a("http://www.simantics.org", "simantics.org")), null); 
+                IStatus s1 = new Status(IStatus.INFO, Activator.PLUGIN_ID, "Test message 1", null);  //$NON-NLS-1$
+                IStatus s2 = new Status(IStatus.WARNING, Activator.PLUGIN_ID, "Test message 2", null);  //$NON-NLS-1$
+                IStatus s3 = new DetailStatus(IStatus.ERROR, Activator.PLUGIN_ID, "This is the short message.", HtmlUtil.p("A multi-lined message...\n<br/>continuing...<br/><br/>still...<br/>Error occurred, report at {0}" + HtmlUtil.a("http://www.simantics.org", "simantics.org")), null);  //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-1$
                 MessageService.defaultLog(s1);
                 MessageService.defaultLog(s2);
                 MessageService.defaultLog(s3);
@@ -608,16 +604,16 @@ public class LogView extends ViewPart implements ILogListener {
 //                Activator.getDefault().getLog().log(s2);
 //                Activator.getDefault().getLog().log(s3);
 
-                MultiStatus s4 = new MultiStatus(Activator.PLUGIN_ID, 0, "Test message 4", new Exception());
-                s4.merge(new Status(IStatus.INFO, Activator.PLUGIN_ID, "MultiStatus Test 1", null));
-                s4.merge(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "MultiStatus Test 2", null));
-                s4.merge(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "MultiStatus Test 3", null));
+                MultiStatus s4 = new MultiStatus(Activator.PLUGIN_ID, 0, "Test message 4", new Exception()); //$NON-NLS-1$
+                s4.merge(new Status(IStatus.INFO, Activator.PLUGIN_ID, "MultiStatus Test 1", null)); //$NON-NLS-1$
+                s4.merge(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "MultiStatus Test 2", null)); //$NON-NLS-1$
+                s4.merge(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "MultiStatus Test 3", null)); //$NON-NLS-1$
                 MessageService.defaultLog(s4);
 //                Activator.getDefault().getLog().log(s4);
             }
         };
         action.setImageDescriptor(ImageDescriptor.getMissingImageDescriptor());
-        action.setToolTipText("Produce test log entries");
+        action.setToolTipText("Produce test log entries"); //$NON-NLS-1$
         return action;
     }
 
@@ -1097,7 +1093,7 @@ public class LogView extends ViewPart implements ILogListener {
                    // Remove the content description in this case
                    // to save vertical space from the view.
                        //return Messages.LogView_WorkspaceLogFile;
-                   return "";
+                   return ""; //$NON-NLS-1$
                }
 
                Map<String, File> sources = LogFilesManager.getLogSources();
index f6ab65980d1b40981b3f9da35c90e5cbad1ab506..d62492c9057b404848a41b75dfaee8c83cd5717d 100644 (file)
@@ -69,6 +69,7 @@ public class Messages extends NLS {
        public static String LogView_GroupBySession;
        public static String LogView_LogFileTitle;
        public static String LogView_OpenFile;
+       public static String LogView_Truncated;
        public static String LogView_WorkspaceLogFile;
 
        public static String LogViewLabelProvider_Session;
index bdb9b6bc57a3c514019807c2e59b49330b47691d..545a20e0207f716e3038e5ced46d1093c828cbb4 100644 (file)
@@ -27,92 +27,92 @@ public class TextColors {
     }
 
     static Mapping[] colors = new Mapping[] {
-        new Mapping("AliceBlue", new RGB(0xF0, 0xF8, 0xFF)),
-        new Mapping("AntiqueWhite", new RGB(0xFA, 0xEB, 0xD7)), new Mapping("Aqua", new RGB(0x00, 0xFF, 0xFF)),
-        new Mapping("Aquamarine", new RGB(0x7F, 0xFF, 0xD4)), new Mapping("Azure", new RGB(0xF0, 0xFF, 0xFF)),
-        new Mapping("Beige", new RGB(0xF5, 0xF5, 0xDC)), new Mapping("Bisque", new RGB(0xFF, 0xE4, 0xC4)),
-        new Mapping("Black", new RGB(0x00, 0x00, 0x00)), new Mapping("BlanchedAlmond", new RGB(0xFF, 0xEB, 0xCD)),
-        new Mapping("Blue", new RGB(0x00, 0x00, 0xFF)), new Mapping("BlueViolet", new RGB(0x8A, 0x2B, 0xE2)),
-        new Mapping("Brown", new RGB(0xA5, 0x2A, 0x2A)), new Mapping("BurlyWood", new RGB(0xDE, 0xB8, 0x87)),
-        new Mapping("CadetBlue", new RGB(0x5F, 0x9E, 0xA0)), new Mapping("Chartreuse", new RGB(0x7F, 0xFF, 0x00)),
-        new Mapping("Chocolate", new RGB(0xD2, 0x69, 0x1E)), new Mapping("Coral", new RGB(0xFF, 0x7F, 0x50)),
-        new Mapping("CornflowerBlue", new RGB(0x64, 0x95, 0xED)),
-        new Mapping("Cornsilk", new RGB(0xFF, 0xF8, 0xDC)), new Mapping("Crimson", new RGB(0xDC, 0x14, 0x3C)),
-        new Mapping("Cyan", new RGB(0x00, 0xFF, 0xFF)), new Mapping("DarkBlue", new RGB(0x00, 0x00, 0x8B)),
-        new Mapping("DarkCyan", new RGB(0x00, 0x8B, 0x8B)),
-        new Mapping("DarkGoldenRod", new RGB(0xB8, 0x86, 0x0B)),
-        new Mapping("DarkGray", new RGB(0xA9, 0xA9, 0xA9)), new Mapping("DarkGreen", new RGB(0x00, 0x64, 0x00)),
-        new Mapping("DarkKhaki", new RGB(0xBD, 0xB7, 0x6B)), new Mapping("DarkMagenta", new RGB(0x8B, 0x00, 0x8B)),
-        new Mapping("DarkOliveGreen", new RGB(0x55, 0x6B, 0x2F)),
-        new Mapping("Darkorange", new RGB(0xFF, 0x8C, 0x00)), new Mapping("DarkOrchid", new RGB(0x99, 0x32, 0xCC)),
-        new Mapping("DarkRed", new RGB(0x8B, 0x00, 0x00)), new Mapping("DarkSalmon", new RGB(0xE9, 0x96, 0x7A)),
-        new Mapping("DarkSeaGreen", new RGB(0x8F, 0xBC, 0x8F)),
-        new Mapping("DarkSlateBlue", new RGB(0x48, 0x3D, 0x8B)),
-        new Mapping("DarkSlateGray", new RGB(0x2F, 0x4F, 0x4F)),
-        new Mapping("DarkTurquoise", new RGB(0x00, 0xCE, 0xD1)),
-        new Mapping("DarkViolet", new RGB(0x94, 0x00, 0xD3)), new Mapping("DeepPink", new RGB(0xFF, 0x14, 0x93)),
-        new Mapping("DeepSkyBlue", new RGB(0x00, 0xBF, 0xFF)), new Mapping("DimGray", new RGB(0x69, 0x69, 0x69)),
-        new Mapping("DodgerBlue", new RGB(0x1E, 0x90, 0xFF)), new Mapping("FireBrick", new RGB(0xB2, 0x22, 0x22)),
-        new Mapping("FloralWhite", new RGB(0xFF, 0xFA, 0xF0)),
-        new Mapping("ForestGreen", new RGB(0x22, 0x8B, 0x22)), new Mapping("Fuchsia", new RGB(0xFF, 0x00, 0xFF)),
-        new Mapping("Gainsboro", new RGB(0xDC, 0xDC, 0xDC)), new Mapping("GhostWhite", new RGB(0xF8, 0xF8, 0xFF)),
-        new Mapping("Gold", new RGB(0xFF, 0xD7, 0x00)), new Mapping("GoldenRod", new RGB(0xDA, 0xA5, 0x20)),
-        new Mapping("Gray", new RGB(0x80, 0x80, 0x80)), new Mapping("Green", new RGB(0x00, 0x80, 0x00)),
-        new Mapping("GreenYellow", new RGB(0xAD, 0xFF, 0x2F)), new Mapping("HoneyDew", new RGB(0xF0, 0xFF, 0xF0)),
-        new Mapping("HotPink", new RGB(0xFF, 0x69, 0xB4)), new Mapping("IndianRed", new RGB(0xCD, 0x5C, 0x5C)),
-        new Mapping("Indigo", new RGB(0x4B, 0x00, 0x82)), new Mapping("Ivory", new RGB(0xFF, 0xFF, 0xF0)),
-        new Mapping("Khaki", new RGB(0xF0, 0xE6, 0x8C)), new Mapping("Lavender", new RGB(0xE6, 0xE6, 0xFA)),
-        new Mapping("LavenderBlush", new RGB(0xFF, 0xF0, 0xF5)),
-        new Mapping("LawnGreen", new RGB(0x7C, 0xFC, 0x00)),
-        new Mapping("LemonChiffon", new RGB(0xFF, 0xFA, 0xCD)),
-        new Mapping("LightBlue", new RGB(0xAD, 0xD8, 0xE6)), new Mapping("LightCoral", new RGB(0xF0, 0x80, 0x80)),
-        new Mapping("LightCyan", new RGB(0xE0, 0xFF, 0xFF)),
-        new Mapping("LightGoldenRodYellow", new RGB(0xFA, 0xFA, 0xD2)),
-        new Mapping("LightGrey", new RGB(0xD3, 0xD3, 0xD3)), new Mapping("LightGreen", new RGB(0x90, 0xEE, 0x90)),
-        new Mapping("LightPink", new RGB(0xFF, 0xB6, 0xC1)), new Mapping("LightSalmon", new RGB(0xFF, 0xA0, 0x7A)),
-        new Mapping("LightSeaGreen", new RGB(0x20, 0xB2, 0xAA)),
-        new Mapping("LightSkyBlue", new RGB(0x87, 0xCE, 0xFA)),
-        new Mapping("LightSlateGray", new RGB(0x77, 0x88, 0x99)),
-        new Mapping("LightSteelBlue", new RGB(0xB0, 0xC4, 0xDE)),
-        new Mapping("LightYellow", new RGB(0xFF, 0xFF, 0xE0)), new Mapping("Lime", new RGB(0x00, 0xFF, 0x00)),
-        new Mapping("LimeGreen", new RGB(0x32, 0xCD, 0x32)), new Mapping("Linen", new RGB(0xFA, 0xF0, 0xE6)),
-        new Mapping("Magenta", new RGB(0xFF, 0x00, 0xFF)), new Mapping("Maroon", new RGB(0x80, 0x00, 0x00)),
-        new Mapping("MediumAquaMarine", new RGB(0x66, 0xCD, 0xAA)),
-        new Mapping("MediumBlue", new RGB(0x00, 0x00, 0xCD)),
-        new Mapping("MediumOrchid", new RGB(0xBA, 0x55, 0xD3)),
-        new Mapping("MediumPurple", new RGB(0x93, 0x70, 0xD8)),
-        new Mapping("MediumSeaGreen", new RGB(0x3C, 0xB3, 0x71)),
-        new Mapping("MediumSlateBlue", new RGB(0x7B, 0x68, 0xEE)),
-        new Mapping("MediumSpringGreen", new RGB(0x00, 0xFA, 0x9A)),
-        new Mapping("MediumTurquoise", new RGB(0x48, 0xD1, 0xCC)),
-        new Mapping("MediumVioletRed", new RGB(0xC7, 0x15, 0x85)),
-        new Mapping("MidnightBlue", new RGB(0x19, 0x19, 0x70)),
-        new Mapping("MintCream", new RGB(0xF5, 0xFF, 0xFA)), new Mapping("MistyRose", new RGB(0xFF, 0xE4, 0xE1)),
-        new Mapping("Moccasin", new RGB(0xFF, 0xE4, 0xB5)), new Mapping("NavajoWhite", new RGB(0xFF, 0xDE, 0xAD)),
-        new Mapping("Navy", new RGB(0x00, 0x00, 0x80)), new Mapping("OldLace", new RGB(0xFD, 0xF5, 0xE6)),
-        new Mapping("Olive", new RGB(0x80, 0x80, 0x00)), new Mapping("OliveDrab", new RGB(0x6B, 0x8E, 0x23)),
-        new Mapping("Orange", new RGB(0xFF, 0xA5, 0x00)), new Mapping("OrangeRed", new RGB(0xFF, 0x45, 0x00)),
-        new Mapping("Orchid", new RGB(0xDA, 0x70, 0xD6)), new Mapping("PaleGoldenRod", new RGB(0xEE, 0xE8, 0xAA)),
-        new Mapping("PaleGreen", new RGB(0x98, 0xFB, 0x98)),
-        new Mapping("PaleTurquoise", new RGB(0xAF, 0xEE, 0xEE)),
-        new Mapping("PaleVioletRed", new RGB(0xD8, 0x70, 0x93)),
-        new Mapping("PapayaWhip", new RGB(0xFF, 0xEF, 0xD5)), new Mapping("PeachPuff", new RGB(0xFF, 0xDA, 0xB9)),
-        new Mapping("Peru", new RGB(0xCD, 0x85, 0x3F)), new Mapping("Pink", new RGB(0xFF, 0xC0, 0xCB)),
-        new Mapping("Plum", new RGB(0xDD, 0xA0, 0xDD)), new Mapping("PowderBlue", new RGB(0xB0, 0xE0, 0xE6)),
-        new Mapping("Purple", new RGB(0x80, 0x00, 0x80)), new Mapping("Red", new RGB(0xFF, 0x00, 0x00)),
-        new Mapping("RosyBrown", new RGB(0xBC, 0x8F, 0x8F)), new Mapping("RoyalBlue", new RGB(0x41, 0x69, 0xE1)),
-        new Mapping("SaddleBrown", new RGB(0x8B, 0x45, 0x13)), new Mapping("Salmon", new RGB(0xFA, 0x80, 0x72)),
-        new Mapping("SandyBrown", new RGB(0xF4, 0xA4, 0x60)), new Mapping("SeaGreen", new RGB(0x2E, 0x8B, 0x57)),
-        new Mapping("SeaShell", new RGB(0xFF, 0xF5, 0xEE)), new Mapping("Sienna", new RGB(0xA0, 0x52, 0x2D)),
-        new Mapping("Silver", new RGB(0xC0, 0xC0, 0xC0)), new Mapping("SkyBlue", new RGB(0x87, 0xCE, 0xEB)),
-        new Mapping("SlateBlue", new RGB(0x6A, 0x5A, 0xCD)), new Mapping("SlateGray", new RGB(0x70, 0x80, 0x90)),
-        new Mapping("Snow", new RGB(0xFF, 0xFA, 0xFA)), new Mapping("SpringGreen", new RGB(0x00, 0xFF, 0x7F)),
-        new Mapping("SteelBlue", new RGB(0x46, 0x82, 0xB4)), new Mapping("Tan", new RGB(0xD2, 0xB4, 0x8C)),
-        new Mapping("Teal", new RGB(0x00, 0x80, 0x80)), new Mapping("Thistle", new RGB(0xD8, 0xBF, 0xD8)),
-        new Mapping("Tomato", new RGB(0xFF, 0x63, 0x47)), new Mapping("Turquoise", new RGB(0x40, 0xE0, 0xD0)),
-        new Mapping("Violet", new RGB(0xEE, 0x82, 0xEE)), new Mapping("Wheat", new RGB(0xF5, 0xDE, 0xB3)),
-        new Mapping("White", new RGB(0xFF, 0xFF, 0xFF)), new Mapping("WhiteSmoke", new RGB(0xF5, 0xF5, 0xF5)),
-        new Mapping("Yellow", new RGB(0xFF, 0xFF, 0x00)), new Mapping("YellowGreen", new RGB(0x9A, 0xCD, 0x32))
+        new Mapping("AliceBlue", new RGB(0xF0, 0xF8, 0xFF)), //$NON-NLS-1$
+        new Mapping("AntiqueWhite", new RGB(0xFA, 0xEB, 0xD7)), new Mapping("Aqua", new RGB(0x00, 0xFF, 0xFF)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Aquamarine", new RGB(0x7F, 0xFF, 0xD4)), new Mapping("Azure", new RGB(0xF0, 0xFF, 0xFF)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Beige", new RGB(0xF5, 0xF5, 0xDC)), new Mapping("Bisque", new RGB(0xFF, 0xE4, 0xC4)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Black", new RGB(0x00, 0x00, 0x00)), new Mapping("BlanchedAlmond", new RGB(0xFF, 0xEB, 0xCD)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Blue", new RGB(0x00, 0x00, 0xFF)), new Mapping("BlueViolet", new RGB(0x8A, 0x2B, 0xE2)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Brown", new RGB(0xA5, 0x2A, 0x2A)), new Mapping("BurlyWood", new RGB(0xDE, 0xB8, 0x87)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("CadetBlue", new RGB(0x5F, 0x9E, 0xA0)), new Mapping("Chartreuse", new RGB(0x7F, 0xFF, 0x00)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Chocolate", new RGB(0xD2, 0x69, 0x1E)), new Mapping("Coral", new RGB(0xFF, 0x7F, 0x50)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("CornflowerBlue", new RGB(0x64, 0x95, 0xED)), //$NON-NLS-1$
+        new Mapping("Cornsilk", new RGB(0xFF, 0xF8, 0xDC)), new Mapping("Crimson", new RGB(0xDC, 0x14, 0x3C)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Cyan", new RGB(0x00, 0xFF, 0xFF)), new Mapping("DarkBlue", new RGB(0x00, 0x00, 0x8B)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("DarkCyan", new RGB(0x00, 0x8B, 0x8B)), //$NON-NLS-1$
+        new Mapping("DarkGoldenRod", new RGB(0xB8, 0x86, 0x0B)), //$NON-NLS-1$
+        new Mapping("DarkGray", new RGB(0xA9, 0xA9, 0xA9)), new Mapping("DarkGreen", new RGB(0x00, 0x64, 0x00)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("DarkKhaki", new RGB(0xBD, 0xB7, 0x6B)), new Mapping("DarkMagenta", new RGB(0x8B, 0x00, 0x8B)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("DarkOliveGreen", new RGB(0x55, 0x6B, 0x2F)), //$NON-NLS-1$
+        new Mapping("Darkorange", new RGB(0xFF, 0x8C, 0x00)), new Mapping("DarkOrchid", new RGB(0x99, 0x32, 0xCC)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("DarkRed", new RGB(0x8B, 0x00, 0x00)), new Mapping("DarkSalmon", new RGB(0xE9, 0x96, 0x7A)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("DarkSeaGreen", new RGB(0x8F, 0xBC, 0x8F)), //$NON-NLS-1$
+        new Mapping("DarkSlateBlue", new RGB(0x48, 0x3D, 0x8B)), //$NON-NLS-1$
+        new Mapping("DarkSlateGray", new RGB(0x2F, 0x4F, 0x4F)), //$NON-NLS-1$
+        new Mapping("DarkTurquoise", new RGB(0x00, 0xCE, 0xD1)), //$NON-NLS-1$
+        new Mapping("DarkViolet", new RGB(0x94, 0x00, 0xD3)), new Mapping("DeepPink", new RGB(0xFF, 0x14, 0x93)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("DeepSkyBlue", new RGB(0x00, 0xBF, 0xFF)), new Mapping("DimGray", new RGB(0x69, 0x69, 0x69)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("DodgerBlue", new RGB(0x1E, 0x90, 0xFF)), new Mapping("FireBrick", new RGB(0xB2, 0x22, 0x22)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("FloralWhite", new RGB(0xFF, 0xFA, 0xF0)), //$NON-NLS-1$
+        new Mapping("ForestGreen", new RGB(0x22, 0x8B, 0x22)), new Mapping("Fuchsia", new RGB(0xFF, 0x00, 0xFF)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Gainsboro", new RGB(0xDC, 0xDC, 0xDC)), new Mapping("GhostWhite", new RGB(0xF8, 0xF8, 0xFF)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Gold", new RGB(0xFF, 0xD7, 0x00)), new Mapping("GoldenRod", new RGB(0xDA, 0xA5, 0x20)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Gray", new RGB(0x80, 0x80, 0x80)), new Mapping("Green", new RGB(0x00, 0x80, 0x00)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("GreenYellow", new RGB(0xAD, 0xFF, 0x2F)), new Mapping("HoneyDew", new RGB(0xF0, 0xFF, 0xF0)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("HotPink", new RGB(0xFF, 0x69, 0xB4)), new Mapping("IndianRed", new RGB(0xCD, 0x5C, 0x5C)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Indigo", new RGB(0x4B, 0x00, 0x82)), new Mapping("Ivory", new RGB(0xFF, 0xFF, 0xF0)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Khaki", new RGB(0xF0, 0xE6, 0x8C)), new Mapping("Lavender", new RGB(0xE6, 0xE6, 0xFA)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("LavenderBlush", new RGB(0xFF, 0xF0, 0xF5)), //$NON-NLS-1$
+        new Mapping("LawnGreen", new RGB(0x7C, 0xFC, 0x00)), //$NON-NLS-1$
+        new Mapping("LemonChiffon", new RGB(0xFF, 0xFA, 0xCD)), //$NON-NLS-1$
+        new Mapping("LightBlue", new RGB(0xAD, 0xD8, 0xE6)), new Mapping("LightCoral", new RGB(0xF0, 0x80, 0x80)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("LightCyan", new RGB(0xE0, 0xFF, 0xFF)), //$NON-NLS-1$
+        new Mapping("LightGoldenRodYellow", new RGB(0xFA, 0xFA, 0xD2)), //$NON-NLS-1$
+        new Mapping("LightGrey", new RGB(0xD3, 0xD3, 0xD3)), new Mapping("LightGreen", new RGB(0x90, 0xEE, 0x90)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("LightPink", new RGB(0xFF, 0xB6, 0xC1)), new Mapping("LightSalmon", new RGB(0xFF, 0xA0, 0x7A)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("LightSeaGreen", new RGB(0x20, 0xB2, 0xAA)), //$NON-NLS-1$
+        new Mapping("LightSkyBlue", new RGB(0x87, 0xCE, 0xFA)), //$NON-NLS-1$
+        new Mapping("LightSlateGray", new RGB(0x77, 0x88, 0x99)), //$NON-NLS-1$
+        new Mapping("LightSteelBlue", new RGB(0xB0, 0xC4, 0xDE)), //$NON-NLS-1$
+        new Mapping("LightYellow", new RGB(0xFF, 0xFF, 0xE0)), new Mapping("Lime", new RGB(0x00, 0xFF, 0x00)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("LimeGreen", new RGB(0x32, 0xCD, 0x32)), new Mapping("Linen", new RGB(0xFA, 0xF0, 0xE6)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Magenta", new RGB(0xFF, 0x00, 0xFF)), new Mapping("Maroon", new RGB(0x80, 0x00, 0x00)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("MediumAquaMarine", new RGB(0x66, 0xCD, 0xAA)), //$NON-NLS-1$
+        new Mapping("MediumBlue", new RGB(0x00, 0x00, 0xCD)), //$NON-NLS-1$
+        new Mapping("MediumOrchid", new RGB(0xBA, 0x55, 0xD3)), //$NON-NLS-1$
+        new Mapping("MediumPurple", new RGB(0x93, 0x70, 0xD8)), //$NON-NLS-1$
+        new Mapping("MediumSeaGreen", new RGB(0x3C, 0xB3, 0x71)), //$NON-NLS-1$
+        new Mapping("MediumSlateBlue", new RGB(0x7B, 0x68, 0xEE)), //$NON-NLS-1$
+        new Mapping("MediumSpringGreen", new RGB(0x00, 0xFA, 0x9A)), //$NON-NLS-1$
+        new Mapping("MediumTurquoise", new RGB(0x48, 0xD1, 0xCC)), //$NON-NLS-1$
+        new Mapping("MediumVioletRed", new RGB(0xC7, 0x15, 0x85)), //$NON-NLS-1$
+        new Mapping("MidnightBlue", new RGB(0x19, 0x19, 0x70)), //$NON-NLS-1$
+        new Mapping("MintCream", new RGB(0xF5, 0xFF, 0xFA)), new Mapping("MistyRose", new RGB(0xFF, 0xE4, 0xE1)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Moccasin", new RGB(0xFF, 0xE4, 0xB5)), new Mapping("NavajoWhite", new RGB(0xFF, 0xDE, 0xAD)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Navy", new RGB(0x00, 0x00, 0x80)), new Mapping("OldLace", new RGB(0xFD, 0xF5, 0xE6)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Olive", new RGB(0x80, 0x80, 0x00)), new Mapping("OliveDrab", new RGB(0x6B, 0x8E, 0x23)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Orange", new RGB(0xFF, 0xA5, 0x00)), new Mapping("OrangeRed", new RGB(0xFF, 0x45, 0x00)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Orchid", new RGB(0xDA, 0x70, 0xD6)), new Mapping("PaleGoldenRod", new RGB(0xEE, 0xE8, 0xAA)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("PaleGreen", new RGB(0x98, 0xFB, 0x98)), //$NON-NLS-1$
+        new Mapping("PaleTurquoise", new RGB(0xAF, 0xEE, 0xEE)), //$NON-NLS-1$
+        new Mapping("PaleVioletRed", new RGB(0xD8, 0x70, 0x93)), //$NON-NLS-1$
+        new Mapping("PapayaWhip", new RGB(0xFF, 0xEF, 0xD5)), new Mapping("PeachPuff", new RGB(0xFF, 0xDA, 0xB9)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Peru", new RGB(0xCD, 0x85, 0x3F)), new Mapping("Pink", new RGB(0xFF, 0xC0, 0xCB)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Plum", new RGB(0xDD, 0xA0, 0xDD)), new Mapping("PowderBlue", new RGB(0xB0, 0xE0, 0xE6)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Purple", new RGB(0x80, 0x00, 0x80)), new Mapping("Red", new RGB(0xFF, 0x00, 0x00)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("RosyBrown", new RGB(0xBC, 0x8F, 0x8F)), new Mapping("RoyalBlue", new RGB(0x41, 0x69, 0xE1)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("SaddleBrown", new RGB(0x8B, 0x45, 0x13)), new Mapping("Salmon", new RGB(0xFA, 0x80, 0x72)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("SandyBrown", new RGB(0xF4, 0xA4, 0x60)), new Mapping("SeaGreen", new RGB(0x2E, 0x8B, 0x57)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("SeaShell", new RGB(0xFF, 0xF5, 0xEE)), new Mapping("Sienna", new RGB(0xA0, 0x52, 0x2D)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Silver", new RGB(0xC0, 0xC0, 0xC0)), new Mapping("SkyBlue", new RGB(0x87, 0xCE, 0xEB)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("SlateBlue", new RGB(0x6A, 0x5A, 0xCD)), new Mapping("SlateGray", new RGB(0x70, 0x80, 0x90)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Snow", new RGB(0xFF, 0xFA, 0xFA)), new Mapping("SpringGreen", new RGB(0x00, 0xFF, 0x7F)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("SteelBlue", new RGB(0x46, 0x82, 0xB4)), new Mapping("Tan", new RGB(0xD2, 0xB4, 0x8C)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Teal", new RGB(0x00, 0x80, 0x80)), new Mapping("Thistle", new RGB(0xD8, 0xBF, 0xD8)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Tomato", new RGB(0xFF, 0x63, 0x47)), new Mapping("Turquoise", new RGB(0x40, 0xE0, 0xD0)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Violet", new RGB(0xEE, 0x82, 0xEE)), new Mapping("Wheat", new RGB(0xF5, 0xDE, 0xB3)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("White", new RGB(0xFF, 0xFF, 0xFF)), new Mapping("WhiteSmoke", new RGB(0xF5, 0xF5, 0xF5)), //$NON-NLS-1$ //$NON-NLS-2$
+        new Mapping("Yellow", new RGB(0xFF, 0xFF, 0x00)), new Mapping("YellowGreen", new RGB(0x9A, 0xCD, 0x32)) //$NON-NLS-1$ //$NON-NLS-2$
     };
 
     public static void bindTo(ResourceManager manager, FormText text) {
index 8dd361149fa77db2e7d2f7ee0b286bef9448cda1..0e76f4b6956c40d6c39681f5eb48ac557c2a78da 100644 (file)
@@ -63,6 +63,7 @@ LogView_GroupByPlugin=Plug-in
 LogView_GroupBySession=Session
 LogView_LogFileTitle={0} [{1}]
 LogView_OpenFile=Open File
+LogView_Truncated=... [truncated {0} out of {1} characters]
 LogView_WorkspaceLogFile=Workspace Log
 LogViewLabelProvider_truncatedMessage=... (Open log entry details for full message)
 LogViewLabelProvider_Session=Session
index 7b3adcdce68d0a33370cd78163f6e43c1c2c8100..1bcd891ede4e9e859ec2cc4d228fd73912a1292e 100644 (file)
@@ -24,13 +24,13 @@ import org.simantics.utils.ui.workbench.WorkbenchUtils;
 public class HttpSchemeHandler extends AbstractMessageSchemeHandler<URL> {
 
     public HttpSchemeHandler() {
-        super("http", URL.class);
+        super("http", URL.class); //$NON-NLS-1$
     }
 
     @Override
     public void doPerform(URL url) {
         try {
-            WorkbenchUtils.openEditor("org.simantics.editors.browser", new BrowserInput(url));
+            WorkbenchUtils.openEditor("org.simantics.editors.browser", new BrowserInput(url)); //$NON-NLS-1$
         } catch (PartInitException e) {
             throw new RuntimeException(e);
         }
index 1d400dcfc247e649fe06beb09d4a10cea4c27aae..0c29189ff33fe6e2ae83ec183f3f63ca74f8d487 100644 (file)
@@ -26,7 +26,7 @@ import org.simantics.utils.ui.workbench.WorkbenchUtils;
 public class ResourceSchemeHandler extends AbstractMessageSchemeHandler<Resource> {
 
     public ResourceSchemeHandler() {
-        super("resource", Resource.class);
+        super("resource", Resource.class); //$NON-NLS-1$
     }
 
     @Override
@@ -34,7 +34,7 @@ public class ResourceSchemeHandler extends AbstractMessageSchemeHandler<Resource
         Session session = Simantics.peekSession();
         if (session == null) {
             // FIXME: not stdout.
-            System.out.println("ResourceSchemeHandler: no session");
+            System.out.println("ResourceSchemeHandler: no session"); //$NON-NLS-1$
             return;
         }
 
diff --git a/bundles/org.simantics.message.ui/src/org/simantics/message/ui/test/Messages.java b/bundles/org.simantics.message.ui/src/org/simantics/message/ui/test/Messages.java
deleted file mode 100644 (file)
index 8bea312..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
- * in Industry THTH ry.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
-package org.simantics.message.ui.test;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
-       public static String Test_message;
-
-       private static final String BUNDLE_NAME = "org.simantics.message.ui.test.messages"; //$NON-NLS-1$
-
-       static {
-               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-       }
-
-}
index de7468d8e7dd9b06ea3678c565738fc1a5898246..d541944efb4b62be88de7ef0b27658fc681a8197 100644 (file)
@@ -46,8 +46,8 @@ public class TestResourceStatusHandler extends AbstractHandler {
             int code = 0;
             for (Resource r : rs) {
                 log.log(new DetailStatus(IDetailStatus.DEBUG, Activator.PLUGIN_ID, code++,
-                        "Logged reference to selected resource",
-                        NLS.bind(Messages.Test_message, MessageUtil.resource(s, r, "this link")),
+                        "Logged reference to selected resource", //$NON-NLS-1$
+                        NLS.bind("<p>This is a detailed message that contains links to related information. Follow {0} to open your favorite editor for the database resource.</p>", MessageUtil.resource(s, r, "this link")), //$NON-NLS-1$
                         null));
             }
         } catch (ReferenceSerializationException e) {
diff --git a/bundles/org.simantics.message.ui/src/org/simantics/message/ui/test/messages.properties b/bundles/org.simantics.message.ui/src/org/simantics/message/ui/test/messages.properties
deleted file mode 100644 (file)
index 34d6c2b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2010 Association for Decentralized Information Management
-# in Industry THTH ry.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     VTT Technical Research Centre of Finland - initial API and implementation
-###############################################################################
-
-Test_message = <p>This is a detailed message that contains links to related information. Follow {0} to open your favorite editor for the database resource.</p>
diff --git a/bundles/org.simantics.migration.ui/src/org/simantics/migration/ui/Messages.java b/bundles/org.simantics.migration.ui/src/org/simantics/migration/ui/Messages.java
new file mode 100644 (file)
index 0000000..4b64beb
--- /dev/null
@@ -0,0 +1,16 @@
+package org.simantics.migration.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.migration.ui.messages"; //$NON-NLS-1$
+       public static String MigrateActionFactory_Migrate;
+       public static String MigrateActionFactory_MigrateMsg;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index c49c15389d984d6dc4f56fa49dd4db193c6e9738..bd7ce3845facecbe3744c17a52a24ae81a0bf951 100644 (file)
@@ -53,8 +53,8 @@ public class MigrateActionFactory implements ActionFactory {
     
     private void select(final Resource resource, final ArrayList<Update> updates) {
         ListDialog listDialog = new ListDialog(Display.getCurrent().getActiveShell());
-        listDialog.setTitle("Migrate");
-        listDialog.setMessage("Choose the version to migrate to");
+        listDialog.setTitle(Messages.MigrateActionFactory_Migrate);
+        listDialog.setMessage(Messages.MigrateActionFactory_MigrateMsg);
         listDialog.setContentProvider(new IStructuredContentProvider() {            
             @Override
             public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {       
diff --git a/bundles/org.simantics.migration.ui/src/org/simantics/migration/ui/messages.properties b/bundles/org.simantics.migration.ui/src/org/simantics/migration/ui/messages.properties
new file mode 100644 (file)
index 0000000..fcb7177
--- /dev/null
@@ -0,0 +1,2 @@
+MigrateActionFactory_Migrate=Migrate\r
+MigrateActionFactory_MigrateMsg=Choose the version to migrate to\r
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$
     }
 
     /*
diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/Messages.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/Messages.java
new file mode 100644 (file)
index 0000000..c5d1d6a
--- /dev/null
@@ -0,0 +1,15 @@
+package org.simantics.modeling.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.modeling.ui.messages"; //$NON-NLS-1$
+       public static String ModelingUIUtils_SelectQueryType;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index fa153e193500d4fa29804c5d723e627dc0047896..2ce2c802bd90990a8e682a5c35729800f4aad74f 100644 (file)
@@ -79,7 +79,7 @@ public class ModelingUIUtils {
                                String label = graph.getPossibleRelatedValue2(_res, L0.HasLabel, Bindings.STRING);
 
                                if (label != null && !name.equals(label)) {
-                                       name = label + " (" + name + ")";
+                                       name = label + " (" + name + ")"; //$NON-NLS-1$ //$NON-NLS-2$
                                }
 
                                Resource parent = graph.getPossibleObject(_res, L0.PartOf);
@@ -88,10 +88,10 @@ public class ModelingUIUtils {
                                String parentURI = graph.getURI(parent);
                                if(parentURI.startsWith(modelURI)) {
                                        parentURI = parentURI.substring(modelURI.length());
-                                       if(parentURI.startsWith("/")) parentURI = parentURI.substring(1);
+                                       if(parentURI.startsWith("/")) parentURI = parentURI.substring(1); //$NON-NLS-1$
                                }
 
-                               name = name + " - " + URIStringUtils.unescape(parentURI);
+                               name = name + " - " + URIStringUtils.unescape(parentURI); //$NON-NLS-1$
 
                                map.put(_res, new Pair<String, ImageDescriptor>(name, null));
                                
@@ -105,7 +105,7 @@ public class ModelingUIUtils {
                                String label = graph.getPossibleRelatedValue2(res, L0.HasLabel, Bindings.STRING);
 
                                if (label != null && !name.equals(label)) {
-                                       name = label + " (" + name + ")";
+                                       name = label + " (" + name + ")"; //$NON-NLS-1$ //$NON-NLS-2$
                                }
 
                                Resource parent = graph.getPossibleObject(_res, L0.PartOf);
@@ -114,10 +114,10 @@ public class ModelingUIUtils {
                                String parentURI = graph.getURI(parent);
                                if(parentURI.startsWith(modelURI)) {
                                        parentURI = parentURI.substring(modelURI.length());
-                                       if(parentURI.startsWith("/")) parentURI = parentURI.substring(1);
+                                       if(parentURI.startsWith("/")) parentURI = parentURI.substring(1); //$NON-NLS-1$
                                }
 
-                               name = name + " - " + URIStringUtils.unescape(parentURI);
+                               name = name + " - " + URIStringUtils.unescape(parentURI); //$NON-NLS-1$
 
                                map.put(_res, new Pair<String, ImageDescriptor>(name, null));
                        
@@ -135,7 +135,7 @@ public class ModelingUIUtils {
                        @Override
                        public void run() {
                                Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-                               ResourceSelectionDialog3<Resource> dialog = new ResourceSelectionDialog3<Resource>(shell, map, "Select query type from list") {
+                               ResourceSelectionDialog3<Resource> dialog = new ResourceSelectionDialog3<Resource>(shell, map, Messages.ModelingUIUtils_SelectQueryType) {
                                        @Override
                                        protected IDialogSettings getBaseDialogSettings() {
                                                return Activator.getDefault().getDialogSettings();
@@ -166,7 +166,7 @@ public class ModelingUIUtils {
                         @Override
                         public void perform(WriteGraph g) throws DatabaseException {
                             g.markUndoPoint();
-                            Simantics.applySCL("Simantics/Query", "createSCLQueryDefault", g, parent, selected);
+                            Simantics.applySCL("Simantics/Query", "createSCLQueryDefault", g, parent, selected); //$NON-NLS-1$ //$NON-NLS-2$
                         }
                     });
                 });
index 94db9c596e301975d7e34e28442d0f158d99307b..ca2fde521cd315cd1a4a526bdda3636bb8656784 100644 (file)
@@ -55,7 +55,7 @@ public class SCLClipboard {
                                if (element != null) {
                                        newSelection.add(element);
                                } else {
-                                       throw new DatabaseException("Could not find IElement for " + element);
+                                       throw new DatabaseException("Could not find IElement for " + element); //$NON-NLS-1$
                                }
                        }
                        
@@ -107,7 +107,7 @@ public class SCLClipboard {
                                if (element != null) {
                                        newSelection.add(element);
                                } else {
-                                       throw new DatabaseException("Could not find IElement for " + element);
+                                       throw new DatabaseException("Could not find IElement for " + element); //$NON-NLS-1$
                                }
                        }
                        
index b9214110b3e66f265ae1f6d8a310e83de17250f5..b6cdcae225fcf2c2486e11fce4ecd27739b692bc 100644 (file)
@@ -10,17 +10,17 @@ public class SCLDiagramTemplate {
 
     public static Variable templateDiagram(ReadGraph graph, Variable self) throws DatabaseException {
         Variable selection = ScenegraphLoaderUtils.getVariableSelection(graph, self);
-        return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "diagram");
+        return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "diagram"); //$NON-NLS-1$
     }
 
     public static Variable templateComposite(ReadGraph graph, Variable self) throws DatabaseException {
         Variable selection = ScenegraphLoaderUtils.getVariableSelection(graph, self);
-       return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "diagramComposite");
+       return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "diagramComposite"); //$NON-NLS-1$
     }
 
     public static Variable templateModel(ReadGraph graph, Variable self) throws DatabaseException {
         Variable selection = ScenegraphLoaderUtils.getVariableSelection(graph, self);
-       return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "model");
+       return PredefinedVariables.getInstance().getPredefinedVariable(graph, selection, "model"); //$NON-NLS-1$
     }
 
 }
\ No newline at end of file
index aada046df3ce04cbccac48b553f8cb8948a074fa..1c5dea754acb55454e629926a67fe1e790f3f391 100644 (file)
@@ -21,6 +21,7 @@ import java.util.Set;
 import java.util.concurrent.atomic.AtomicReference;
 
 import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.IInputValidator;
 import org.eclipse.jface.dialogs.InputDialog;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -28,6 +29,7 @@ import org.eclipse.jface.viewers.ICheckStateProvider;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.PlatformUI;
 import org.simantics.Simantics;
@@ -124,9 +126,9 @@ public class AssignSymbolGroup implements ActionFactory, ActionFactory2 {
 
         @Override
         public String toString() {
-            return getClass().getSimpleName() + "[name=" + name
-                    + ", originally selected=" + originallySelected
-                    + ", selected=" + selected + "]";
+            return getClass().getSimpleName() + "[name=" + name //$NON-NLS-1$
+                    + ", originally selected=" + originallySelected //$NON-NLS-1$
+                    + ", selected=" + selected + "]"; //$NON-NLS-1$ //$NON-NLS-2$
         }
     }
 
@@ -260,19 +262,16 @@ public class AssignSymbolGroup implements ActionFactory, ActionFactory2 {
 
         final Resource model = getCommonModel(symbols);
         if (model == null) {
-            ShowMessage.showInformation("Same Model Required", "All the selected symbols must be from within the same model.");
+            ShowMessage.showInformation(Messages.AssignSymbolGroup_SameModelRequired, Messages.AssignSymbolGroup_SameModelRequiredMsg);
             return;
         }
 
         final AtomicReference<SymbolGroup[]> groups =
                 new AtomicReference<SymbolGroup[]>( getSymbolGroups(symbols) );
 
-        StringBuilder message = new StringBuilder();
-        message.append("Select symbol groups the selected ");
-        if (symbols.size() > 1)
-            message.append(symbols.size()).append(" symbols are shown in.");
-        else
-            message.append("symbol is shown in.");
+        String message = symbols.size() > 1
+                ? NLS.bind(Messages.AssignSymbolGroup_SelectSymbolGroupsTheSelectedSymbolsAreShownIn, symbols.size())
+                :  Messages.AssignSymbolGroup_SelectSymbolGroupsTheSelectedSymbolIsShownIn;
 
         AssignSymbolGroupsDialog dialog = new AssignSymbolGroupsDialog(
                 PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
@@ -326,7 +325,7 @@ public class AssignSymbolGroup implements ActionFactory, ActionFactory2 {
                 }
             }
         };
-        dialog.setTitle("Symbol Group Assignments");
+        dialog.setTitle(Messages.AssignSymbolGroup_SymbolGroupAssignments);
         dialog.setInitialSelections(selectedElements(groups.get()));
         if (dialog.open() == Dialog.OK) {
             final ArrayList<SymbolGroup> added = new ArrayList<SymbolGroup>();
@@ -351,18 +350,18 @@ public class AssignSymbolGroup implements ActionFactory, ActionFactory2 {
 
     private static SymbolGroup newSymbolGroup(Shell shell, Resource model, final SymbolGroup[] oldGroups) {
         InputDialog dialog = new InputDialog(shell,
-                "New Symbol Group",
-                "Write the name of the new symbol group.",
-                "NewSymbolGroup",
+                Messages.AssignSymbolGroup_NewSymbolGroup,
+                Messages.AssignSymbolGroup_WriteSymbolGroupName,
+                "NewSymbolGroup", //$NON-NLS-1$
                 new IInputValidator() {
                     @Override
                     public String isValid(String newText) {
                         newText = newText.trim();
                         if (newText.isEmpty())
-                            return "The name must be non-empty.";
+                            return Messages.AssignSymbolGroup_NameMustNotBeEmpty;
                         for (SymbolGroup g : oldGroups)
                             if (newText.equals(g.name))
-                                return "A symbol group with that name already exists.";
+                                return Messages.AssignSymbolGroup_GroupSymbolAlreadyExists;
                         return null;
                     }
                 }
@@ -388,11 +387,11 @@ public class AssignSymbolGroup implements ActionFactory, ActionFactory2 {
             return false;
         String message;
         if (groups.length == 1)
-            message = "Are you sure you want to remove symbol group '" + groups[0].name + "' ?";
+            message = NLS.bind(Messages.AssignSymbolGroup_AreYouSureToRemoveSymbolGroup, groups[0].name );
         else
-            message = "Are you sure you want to remove " + groups.length + " symbol groups?";
+            message = NLS.bind(Messages.AssignSymbolGroup_AreYouSureToRemoveSymbolGroup1, groups.length );
         MessageDialog dialog = 
-            new MessageDialog(shell, "Confirm removal", null, message, MessageDialog.QUESTION, new String[] { "OK", "Cancel" }, 0);
+            new MessageDialog(shell, Messages.AssignSymbolGroup_ConfirmRemoval, null, message, MessageDialog.QUESTION, new String[] { IDialogConstants.OK_LABEL , IDialogConstants.CANCEL_LABEL  }, 0); 
         if (dialog.open() == Dialog.OK) {
             Simantics.getSession().asyncRequest(new WriteRequest() {
                 @Override
index 68ac2a7a05f01a29c7a8b204927699a01efa710e..b768a05ab728068fcc29a819ffaaf92512974752 100644 (file)
@@ -38,9 +38,9 @@ public abstract class AssignSymbolGroupsDialog extends SelectionDialog {
 
     private static final String DIALOG = "AssignSymbolGroupsDialog"; //$NON-NLS-1$
 
-    static String SELECT_ALL_TITLE = WorkbenchMessages.SelectionDialog_selectLabel;
+    static String SELECT_ALL_TITLE = ""; //$NON-NLS-1$
 
-    static String DESELECT_ALL_TITLE = WorkbenchMessages.SelectionDialog_deselectLabel;
+    static String DESELECT_ALL_TITLE = ""; //$NON-NLS-1$
 
     // the root element to populate the viewer with
     protected Object inputElement;
@@ -78,7 +78,7 @@ public abstract class AssignSymbolGroupsDialog extends SelectionDialog {
             ICheckStateProvider checkStateProvider,
             String message) {
         super(parentShell);
-        setTitle(WorkbenchMessages.ListSelection_title);
+        setTitle(""); //$NON-NLS-1$
         inputElement = input;
         this.contentProvider = contentProvider;
         this.labelProvider = labelProvider;
@@ -86,7 +86,7 @@ public abstract class AssignSymbolGroupsDialog extends SelectionDialog {
         if (message != null) {
             setMessage(message);
         } else {
-            setMessage(WorkbenchMessages.ListSelection_message);
+            setMessage(""); //$NON-NLS-1$
         }
 
         IDialogSettings settings = Activator.getDefault().getDialogSettings();
@@ -139,7 +139,7 @@ public abstract class AssignSymbolGroupsDialog extends SelectionDialog {
         Label label = new Label(buttonComposite, SWT.NONE);
 
         Button newButton = createButton(buttonComposite,
-                IDialogConstants.INTERNAL_ID-1, "&New...", false);
+                IDialogConstants.INTERNAL_ID-1, org.simantics.modeling.ui.actions.WorkbenchMessages.AssignSymbolGroupsDialog_NewDots, false);
 
         listener = new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
@@ -149,7 +149,7 @@ public abstract class AssignSymbolGroupsDialog extends SelectionDialog {
         newButton.addSelectionListener(listener);
 
         Button removeButton = createButton(buttonComposite,
-                IDialogConstants.INTERNAL_ID-2, "&Remove", false);
+                IDialogConstants.INTERNAL_ID-2, org.simantics.modeling.ui.actions.WorkbenchMessages.AssignSymbolGroupsDialog_RemoveAnd, false);
 
         listener = new SelectionAdapter() {
             public void widgetSelected(SelectionEvent e) {
index 0c93e6c2055652a4ce48e003bd646f22009c8d76..651f4f66b21128892a8bd0b8d595996db0f10bf1 100644 (file)
@@ -33,7 +33,7 @@ public class CompilePGraphsAction implements ActionFactory {
         if (!(target instanceof Resource))
             return null;
         return () -> {
-            Job job = new Job("Compile PGraphs") {
+            Job job = new Job(Messages.CompilePGraphsAction_CompilePGraphs) {
                 @Override
                 protected IStatus run(IProgressMonitor monitor) {
                     try {
@@ -59,9 +59,9 @@ public class CompilePGraphsAction implements ActionFactory {
                        class ErrorMessageDialog extends MessageDialog {
                                public ErrorMessageDialog(Shell shell) {
                                        super(shell, 
-                                                       "Problems in the Ontology Definition File", null, 
-                                                       "The following issues were found:"
-                                                       MessageDialog.ERROR, new String[] { "Continue" }, 0);
+                                                       Messages.CompilePGraphsAction_ProblemsinOntologyDefinitionFile, null, 
+                                                       Messages.CompilePGraphsAction_FollowingIssuesFound
+                                                       MessageDialog.ERROR, new String[] { Messages.CompilePGraphsAction_Continue }, 0);
                                }
 
                                @Override
@@ -71,9 +71,9 @@ public class CompilePGraphsAction implements ActionFactory {
                                        org.eclipse.swt.widgets.List list = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.READ_ONLY);
                                        GridDataFactory.fillDefaults().grab(true, true).applyTo(list);
                                        for (Problem problem : result.getErrors())
-                                               list.add(problem.getLocation() + ": " + problem.getDescription() + "\n");
+                                               list.add(problem.getLocation() + ": " + problem.getDescription() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
                                        for (Problem problem : result.getWarnings())
-                                               list.add(problem.getLocation() + ": " + problem.getDescription() + "\n");
+                                               list.add(problem.getLocation() + ": " + problem.getDescription() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
 
                                        return composite;
                                }
index 6f57f86d61f4d3e6de234b87660f2e183c1a7dd2..e392419c9a5ad71455a50eab51734e0c91f11a5c 100644 (file)
@@ -112,9 +112,9 @@ public class ConfigureConnectionTypes implements ActionFactory, ActionFactory2 {
 
         @Override
         public String toString() {
-            return getClass().getSimpleName() + "[name=" + name
-                    + ", originally selected=" + originallySelected
-                    + ", selected=" + selected + "]";
+            return getClass().getSimpleName() + "[name=" + name //$NON-NLS-1$
+                    + ", originally selected=" + originallySelected //$NON-NLS-1$
+                    + ", selected=" + selected + "]"; //$NON-NLS-1$ //$NON-NLS-2$
         }
     }
 
@@ -249,7 +249,7 @@ public class ConfigureConnectionTypes implements ActionFactory, ActionFactory2 {
 
         final Resource indexRoot = getCommonModel(connectionPoints);
         if (indexRoot == null) {
-            ShowMessage.showInformation("Same Model Required", "All the selected connection points must be from within the same index root.");
+            ShowMessage.showInformation(Messages.ConfigureConnectionTypes_SameModelRequired, Messages.ConfigureConnectionTypes_SameModelRequiredMsg);
             return;
         }
 
@@ -258,9 +258,9 @@ public class ConfigureConnectionTypes implements ActionFactory, ActionFactory2 {
 
         StringBuilder message = new StringBuilder();
         if (connectionPoints.size() > 1)
-            message.append("Select connection types for the selected connection points");
+            message.append(Messages.ConfigureConnectionTypes_SelectConnectionTypeForSelectedConnectionPoints);
         else
-            message.append("Select connection types for the selected connection point");
+            message.append(Messages.ConfigureConnectionTypes_SelectConnectionTypeForSelectedConnectionPoint);
 
         ConfigureConnectionTypesDialog dialog = new ConfigureConnectionTypesDialog(
                 PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
@@ -281,7 +281,7 @@ public class ConfigureConnectionTypes implements ActionFactory, ActionFactory2 {
             }
 
         };
-        dialog.setTitle("Connection Type Assignments");
+        dialog.setTitle(Messages.ConfigureConnectionTypes_ConnectionTypeAssignments);
         dialog.setInitialSelections(selectedElements(types.get()));
         if (dialog.open() == Dialog.OK) {
             final ArrayList<ConnectionType> added = new ArrayList<ConnectionType>();
index 407e1ec694345e0b135a6192f5f60585a59e96fa..fc37abbf9bd2123d9c68c446396216e6a267267a 100644 (file)
@@ -31,7 +31,7 @@ public class Copy implements ActionFactory, ActionFactory2 {
                        resources.add((Resource)o);
                }
         return () -> {
-            Job job = new Job("Copy") {
+            Job job = new Job(Messages.Copy_Copy) {
 
                 @Override
                 protected IStatus run(IProgressMonitor monitor) {
index 6b9431abcfc2afe58071224770b67a467d5b48b2..27b55a06bc06ee588daa8dce711c1e75644e9c15 100644 (file)
@@ -19,10 +19,10 @@ public class CreateEllipse extends CreateShapeHandler {
     @Override
     public String getDefaultElementData() {
         final String data = 
-                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + 
-                "<svg overflow=\"visible\" version=\"1.1\">" + 
-                "<ellipse x=\"0\" y=\"0\" rx=\"5\" ry=\"5\" style=\"fill:none;stroke-width:1;stroke:rgb(0,0,0)\"/>"+
-                "</svg>";
+                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +  //$NON-NLS-1$
+                "<svg overflow=\"visible\" version=\"1.1\">" +  //$NON-NLS-1$
+                "<ellipse x=\"0\" y=\"0\" rx=\"5\" ry=\"5\" style=\"fill:none;stroke-width:1;stroke:rgb(0,0,0)\"/>"+ //$NON-NLS-1$
+                "</svg>"; //$NON-NLS-1$
         return data;
     }
 
index 83cada7deaf7b34e4cf5f254942403323b50d47c..8fbda8dc5675bae212e02ed1d28a18c7141a22ee 100644 (file)
@@ -19,10 +19,10 @@ public class CreatePath extends CreateShapeHandler {
     @Override
     public String getDefaultElementData() {
         final String data = 
-                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + 
-                "<svg overflow=\"visible\" version=\"1.1\">" + 
-                "<path d=\"M0 0 L10 0\" style=\"fill:none;stroke-width:1;stroke:rgb(0,0,0)\"/>"+
-                "</svg>";
+                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +  //$NON-NLS-1$
+                "<svg overflow=\"visible\" version=\"1.1\">" +  //$NON-NLS-1$
+                "<path d=\"M0 0 L10 0\" style=\"fill:none;stroke-width:1;stroke:rgb(0,0,0)\"/>"+ //$NON-NLS-1$
+                "</svg>"; //$NON-NLS-1$
         return data;
     }
 
index fccc8ed8003b23ffe4f9d5b0e84a968525a31e9a..781e17c7fc0b3eaa863835123eeeecce07a37b87 100644 (file)
@@ -19,10 +19,10 @@ public class CreateRectangle extends CreateShapeHandler {
     @Override
     public String getDefaultElementData() {
         final String data = 
-                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + 
-                "<svg overflow=\"visible\" version=\"1.1\">" + 
-                "<rect x=\"0\" y=\"0\" width=\"10\" height=\"10\" style=\"fill:none;stroke-width:1;stroke:rgb(0,0,0)\"/>"+
-                "</svg>";
+                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +  //$NON-NLS-1$
+                "<svg overflow=\"visible\" version=\"1.1\">" +  //$NON-NLS-1$
+                "<rect x=\"0\" y=\"0\" width=\"10\" height=\"10\" style=\"fill:none;stroke-width:1;stroke:rgb(0,0,0)\"/>"+ //$NON-NLS-1$
+                "</svg>"; //$NON-NLS-1$
         return data;
     }
 
index b7803a77b387ece14eab3b813d20e0f6753b6d34..aeaa212c12ce99a2a72c1db219dfd12cb01511f7 100644 (file)
@@ -87,9 +87,9 @@ public abstract class CreateShapeHandler extends AbstractHandler {
                     }
                 });
 
-                IEditorPart[] eps = rfe.findEditors(new ResourceEditorInput("org.simantics.modeling.ui.symbolEditor", symbolEditorInput));
+                IEditorPart[] eps = rfe.findEditors(new ResourceEditorInput("org.simantics.modeling.ui.symbolEditor", symbolEditorInput)); //$NON-NLS-1$
                 if (eps.length == 0) {
-                    System.out.println("symbol editor part not found from multi page editor part: " + ap);
+                    System.out.println("symbol editor part not found from multi page editor part: " + ap); //$NON-NLS-1$
                     return null;
                 }
                 viewer = eps[0];
@@ -104,12 +104,12 @@ public abstract class CreateShapeHandler extends AbstractHandler {
         }
         ICanvasContext ctx = (ICanvasContext) viewer.getAdapter(ICanvasContext.class);
         if (ctx == null) {
-            System.out.println("No canvas context");
+            System.out.println("No canvas context"); //$NON-NLS-1$
             return null;
         }
         MouseInfo minfo = ctx.getSingleItem(MouseUtil.class).getMousePressedInfo(0);
         if(minfo == null) {
-            System.out.println("No mouse info");
+            System.out.println("No mouse info"); //$NON-NLS-1$
             return null;
         }
         final Point2D mpos = minfo.canvasPosition;
index 8cd899bb8a775498718c3f44295bff190f5c02e3..ce053c8830b8961b61b4207206bbf24092859160 100644 (file)
@@ -19,10 +19,10 @@ public class CreateText extends CreateShapeHandler {
     @Override
     public String getDefaultElementData() {
         final String data = 
-                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + 
-                "<svg overflow=\"visible\" version=\"1.1\">" +
-                "<text fill=\"rgb(0,0,0)\" stroke=\"none\" font-size=\"12\"><tspan font-family=\"sans-serif\" >Text</tspan></text>" + 
-                "</svg>";
+                "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +  //$NON-NLS-1$
+                "<svg overflow=\"visible\" version=\"1.1\">" + //$NON-NLS-1$
+                "<text fill=\"rgb(0,0,0)\" stroke=\"none\" font-size=\"12\"><tspan font-family=\"sans-serif\" >Text</tspan></text>" +  //$NON-NLS-1$
+                "</svg>"; //$NON-NLS-1$
         return data;
     }
 
index e50233f399b2ad066114e97f84c7982c1ef905ee..51aec07c6d11b92d5dc234206305f363cee4ea92 100644 (file)
@@ -32,7 +32,7 @@ import org.simantics.utils.ui.workbench.WorkbenchUtils;
  */
 public class DuplicatePinnedViewHandler extends AbstractHandler {
 
-    private static final String PIN_SELECTION_COMMAND = "org.simantics.modeling.ui.pinSelection";
+    private static final String PIN_SELECTION_COMMAND = "org.simantics.modeling.ui.pinSelection"; //$NON-NLS-1$
 
     @Override
     public Object execute(ExecutionEvent event) throws ExecutionException {
@@ -48,7 +48,7 @@ public class DuplicatePinnedViewHandler extends AbstractHandler {
             // with a property page just like the original.
             ISelection originalSelection = originalPropertyView.getLastSelection();
 
-            final String id = originalPart.getSite().getId() + "Pinned:" + UUID.randomUUID().toString();
+            final String id = originalPart.getSite().getId() + "Pinned:" + UUID.randomUUID().toString(); //$NON-NLS-1$
             PropertyPageView newPart = (PropertyPageView) WorkbenchUtils.activateView(id);
 
             newPart.partActivated(originalPart);
index c5f3daea62ccffb2c6ed375b057e12e224ab2c80..398ef5dc4135e2f696fbb26589265fec8d4f6f60 100644 (file)
@@ -22,7 +22,7 @@ public class ExpandFlagsHandler extends FlagOperationHandler {
     @Override
     protected void perform(IProgressMonitor monitor, WriteGraph graph, List<Resource> flags,
             ICanvasContext canvasContext) throws DatabaseException {
-        monitor.beginTask("Expand Flags", IProgressMonitor.UNKNOWN);
+        monitor.beginTask(Messages.ExpandFlagsHandler_MonitorExpandFlags, IProgressMonitor.UNKNOWN);
 
         Set<Resource> newSelection = new HashSet<Resource>();
         for (Resource flag : flags) {
index 03512a9c4c723178dda3d1eb8af2021b30bcdc45..35e3fb14e2916b86475aa777d918bfa5ff3cdeaa 100644 (file)
@@ -62,7 +62,7 @@ abstract public class ExplorerDynamicMenuContribution<T> extends DynamicMenuCont
        }
 
        protected ImageDescriptor silk(String name) {
-               return BundleUtils.getImageDescriptorFromBundle(Platform.getBundle("com.famfamfam.silk"), "/icons/" + name);
+               return BundleUtils.getImageDescriptorFromBundle(Platform.getBundle("com.famfamfam.silk"), "/icons/" + name); //$NON-NLS-1$ //$NON-NLS-2$
        }
 
        abstract protected T computeInput(ReadGraph graph, Object[] selection) throws DatabaseException;
index ed41bc13277b61f69c7a4b2af81a815f38888aa3..6f6338f55b3791fd566efce5a573e0ca4609d44c 100644 (file)
@@ -70,9 +70,9 @@ public class ImportSVG extends AbstractHandler {
                     }
                 });
 
-                IEditorPart[] eps = rfe.findEditors(new ResourceEditorInput("org.simantics.modeling.ui.symbolEditor", symbolEditorInput));
+                IEditorPart[] eps = rfe.findEditors(new ResourceEditorInput("org.simantics.modeling.ui.symbolEditor", symbolEditorInput)); //$NON-NLS-1$
                 if (eps.length == 0) {
-                    System.out.println("symbol editor part not found from multi page editor part: " + ap);
+                    System.out.println("symbol editor part not found from multi page editor part: " + ap); //$NON-NLS-1$
                     return null;
                 }
                 viewer = eps[0];
@@ -85,12 +85,12 @@ public class ImportSVG extends AbstractHandler {
         }
         ICanvasContext ctx = (ICanvasContext) viewer.getAdapter(ICanvasContext.class);
         if (ctx == null) {
-            System.out.println("No canvas context");
+            System.out.println("No canvas context"); //$NON-NLS-1$
             return null;
         }
         MouseInfo minfo = ctx.getSingleItem(MouseUtil.class).getMousePressedInfo(0);
         if(minfo == null) {
-            System.out.println("No mouse info");
+            System.out.println("No mouse info"); //$NON-NLS-1$
             return null;
         }
         final Point2D mpos = minfo.canvasPosition;
@@ -105,8 +105,8 @@ public class ImportSVG extends AbstractHandler {
         Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
 
         FileDialog dialog = new FileDialog(shell);
-        dialog.setText("Choose an image to be imported");
-        dialog.setFilterExtensions(new String[] {"*.svg", "*.png"});
+        dialog.setText(Messages.ImportSVG_ChooseImportImage);
+        dialog.setFilterExtensions(new String[] {"*.svg", "*.png"}); //$NON-NLS-1$ //$NON-NLS-2$
 
         final String filename = dialog.open();
         if(filename == null)
@@ -120,7 +120,7 @@ public class ImportSVG extends AbstractHandler {
 
                 @Override
                 public void perform(WriteGraph g) throws DatabaseException {
-                    Commands.get(g, "Simantics/Diagram/createSVGElement")
+                    Commands.get(g, "Simantics/Diagram/createSVGElement") //$NON-NLS-1$
                             .execute(g, g.syncRequest(new IndexRoot(composite)),
                                      composite, suffix(filename), data, mposX, mposY);
                 }
index 15d0ed086e42d4915815860429602bf3385e0919..ea0a40593be4500aae06ec4efe4ac97bba91f6f8 100644 (file)
@@ -43,7 +43,7 @@ public class MergeFlagsAction implements ActionFactory {
                     IRunnableWithProgress runnable = new IRunnableWithProgress() {
                         @Override
                         public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-                            final SubMonitor submonitor = SubMonitor.convert(monitor, "Merge Flags", 1000);
+                            final SubMonitor submonitor = SubMonitor.convert(monitor, Messages.MergeFlagsAction_MonitorMergeFlags, 1000);
                             try {
                                 Simantics.getSession().sync(new WriteRequest() {
                                     @Override
@@ -51,14 +51,14 @@ public class MergeFlagsAction implements ActionFactory {
                                         graph.markUndoPoint();
                                         
                                         SubMonitor expand = submonitor.newChild(10);
-                                        expand.subTask("Expand Composite Set");
+                                        expand.subTask(Messages.MergeFlagsAction_ExpandCompositeSet);
                                         MergeFlags.expandCompositeSet(graph, composites);
                                         if (monitor.isCanceled())
                                             throw new CancelTransactionException();
                                         expand.done();
 
                                         SubMonitor collect = submonitor.newChild(490);
-                                        collect.subTask("Collect flags");
+                                        collect.subTask(Messages.MergeFlagsAction_CollectFlag);
                                         collect.setWorkRemaining(composites.size());
                                         ArrayList<ArrayList<Resource>> groups = new ArrayList<ArrayList<Resource>>(); 
                                         for(Resource composite : composites) {
@@ -70,7 +70,7 @@ public class MergeFlagsAction implements ActionFactory {
                                         collect.done();
 
                                         SubMonitor merge = submonitor.newChild(500);
-                                        merge.subTask("Merge collected flags");
+                                        merge.subTask(Messages.MergeFlagsAction_MonitorMergeCollectedFlags);
                                         merge.setWorkRemaining(composites.size());
                                         for(ArrayList<Resource> group : groups) {
                                             MergeFlags.merge(graph, group);
index 9a7b1055cd08fc90bd0ddec2208fa66131371ea0..3671fa9bbb88298038be9ccc86f8128170a7b497 100644 (file)
@@ -22,7 +22,7 @@ public class MergeFlagsHandler extends FlagOperationHandler {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(MergeFlagsHandler.class);
     protected void perform(IProgressMonitor monitor, WriteGraph graph, List<Resource> flags, ICanvasContext canvasContext) throws DatabaseException {
-        monitor.beginTask("Merge Selected Flags", IProgressMonitor.UNKNOWN);
+        monitor.beginTask(Messages.MergeFlagsHandler_MonitorMergeSelectedFlags, IProgressMonitor.UNKNOWN);
         performMerge(graph, flags, canvasContext);
     }
 
index b3d4896266089592d437a2b2ccf76488401497de..773a3b0b08eed0b597c68092d05351db733baac0 100644 (file)
@@ -18,7 +18,7 @@ public class MergeRelatedFlagsHandler extends FlagOperationHandler {
     @Override
     protected void perform(IProgressMonitor monitor, WriteGraph graph, List<Resource> flags,
             ICanvasContext canvasContext) throws DatabaseException {
-        monitor.beginTask("Merge Related Flags", IProgressMonitor.UNKNOWN);
+        monitor.beginTask(Messages.MergeRelatedFlagsHandler_MonitorMergeRelatedFlags, IProgressMonitor.UNKNOWN);
         MergeFlags.expandFlagSet(graph, flags);
         MergeFlagsHandler.performMerge(graph, flags, canvasContext);
     }
diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/Messages.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/Messages.java
new file mode 100644 (file)
index 0000000..2039c10
--- /dev/null
@@ -0,0 +1,55 @@
+package org.simantics.modeling.ui.actions;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.modeling.ui.actions.messages"; //$NON-NLS-1$
+       public static String AssignSymbolGroup_AreYouSureToRemoveSymbolGroup;
+       public static String AssignSymbolGroup_AreYouSureToRemoveSymbolGroup1;
+       public static String AssignSymbolGroup_ConfirmRemoval;
+       public static String AssignSymbolGroup_GroupSymbolAlreadyExists;
+       public static String AssignSymbolGroup_NameMustNotBeEmpty;
+       public static String AssignSymbolGroup_NewSymbolGroup;
+       public static String AssignSymbolGroup_SameModelRequired;
+       public static String AssignSymbolGroup_SameModelRequiredMsg;
+       public static String AssignSymbolGroup_SelectSymbolGroupsTheSelectedSymbolIsShownIn;
+       public static String AssignSymbolGroup_SelectSymbolGroupsTheSelectedSymbolsAreShownIn;
+       public static String AssignSymbolGroup_SymbolGroupAssignments;
+       public static String AssignSymbolGroup_WriteSymbolGroupName;
+       public static String CompilePGraphsAction_CompilePGraphs;
+       public static String CompilePGraphsAction_Continue;
+       public static String CompilePGraphsAction_FollowingIssuesFound;
+       public static String CompilePGraphsAction_ProblemsinOntologyDefinitionFile;
+       public static String ConfigureConnectionTypes_ConnectionTypeAssignments;
+       public static String ConfigureConnectionTypes_SameModelRequired;
+       public static String ConfigureConnectionTypes_SameModelRequiredMsg;
+       public static String ConfigureConnectionTypes_SelectConnectionTypeForSelectedConnectionPoint;
+       public static String ConfigureConnectionTypes_SelectConnectionTypeForSelectedConnectionPoints;
+       public static String Copy_Copy;
+       public static String ExpandFlagsHandler_MonitorExpandFlags;
+       public static String ImportSVG_ChooseImportImage;
+       public static String MergeFlagsAction_CollectFlag;
+       public static String MergeFlagsAction_ExpandCompositeSet;
+       public static String MergeFlagsAction_MonitorMergeCollectedFlags;
+       public static String MergeFlagsAction_MonitorMergeFlags;
+       public static String MergeFlagsHandler_MonitorMergeSelectedFlags;
+       public static String MergeRelatedFlagsHandler_MonitorMergeRelatedFlags;
+       public static String ModeledActions_ActivatorInvalidContributionsEncounteredIn;
+       public static String NewComponentTypeAction_ActivatorFailedToCreateNewUserComponent;
+       public static String NewComponentTypeAction_NewUserComponent;
+       public static String NewConnectionPoint_SelectConnectionPointType;
+       public static String NewLibrary_Library;
+       public static String NewProceduralComponentType_ActivatorFailedToCreateNewUserComponent;
+       public static String NewProceduralComponentType_NewUserComponent;
+       public static String NewSubscription_Subscription;
+       public static String RenameDiagramComponents_ActivatorRenameDiaActionFailed;
+       public static String SetInitialState_SetInitialState;
+       public static String SwitchComponentTypeContribution_AlternativeTypes;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index 478d8b761046177484db3ecbc02643ada1801feb..e189d752daa85b89dc2fca8c33abbc604fec9c93 100644 (file)
@@ -33,6 +33,7 @@ import org.eclipse.jface.action.ActionContributionItem;
 import org.eclipse.jface.action.IContributionItem;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
+import org.eclipse.osgi.util.NLS;
 import org.simantics.browsing.ui.NodeContext;
 import org.simantics.browsing.ui.common.NodeContextBuilder;
 import org.simantics.browsing.ui.model.InvalidContribution;
@@ -45,7 +46,6 @@ import org.simantics.issues.common.IssueUtils;
 import org.simantics.modeling.ui.Activator;
 import org.simantics.project.ontology.ProjectResource;
 import org.simantics.ui.contribution.DynamicMenuContribution;
-import org.simantics.ui.selection.WorkbenchSelectionElement;
 import org.simantics.ui.selection.WorkbenchSelectionUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -81,12 +81,12 @@ public class ModeledActions extends DynamicMenuContribution implements IExecutab
     public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
         if(data instanceof String) {
             String str = (String)data;
-            String[] parms = str.split(";");
+            String[] parms = str.split(";"); //$NON-NLS-1$
             for(String parm : parms) {
-                String[] keyValue = parm.split("=");
+                String[] keyValue = parm.split("="); //$NON-NLS-1$
                 if(keyValue.length == 2) {
                     String key = keyValue[0].trim();
-                    if("context".equals(key)) {
+                    if("context".equals(key)) { //$NON-NLS-1$
                         browseContexts = Collections.singleton(keyValue[1]);
                     }
                 }
@@ -126,7 +126,7 @@ public class ModeledActions extends DynamicMenuContribution implements IExecutab
                        result.add(NodeContextBuilder.buildWithInput(res));
                }
             } catch (DatabaseException e) {
-               LOGGER.error("Failed to get node contexts for selection.", e);
+               LOGGER.error("Failed to get node contexts for selection.", e); //$NON-NLS-1$
             }
         }
 
@@ -160,7 +160,7 @@ public class ModeledActions extends DynamicMenuContribution implements IExecutab
                 if (first)
                     first = false;
                 else
-                    items.add(new Separator(category == null ? "" : category.getLabel()));
+                    items.add(new Separator(category == null ? "" : category.getLabel())); //$NON-NLS-1$
                 for (Action action : actions)
                     items.add(new ActionContributionItem(action));
             }
@@ -176,10 +176,8 @@ public class ModeledActions extends DynamicMenuContribution implements IExecutab
     }
 
     @Override
-    protected IContributionItem[] getContributionItems(ReadGraph graph, Object[] selection)
-            throws DatabaseException
-    {
-        List<NodeContext> contexts = Arrays.asList( (NodeContext[]) selection );
+    protected IContributionItem[] getContributionItems(ReadGraph graph, Object[] selection) throws DatabaseException {
+        List<NodeContext> contexts = Arrays.asList((NodeContext[]) selection);
         if (contexts.isEmpty())
             return NONE;
 
@@ -200,24 +198,26 @@ public class ModeledActions extends DynamicMenuContribution implements IExecutab
 
                 result = new HashMap<>();
 
-                for(Map.Entry<IActionCategory, List<Action>> entry : m.entrySet()) {
+                for (Map.Entry<IActionCategory, List<Action>> entry : m.entrySet()) {
                     List<Action> exist = current.get(entry.getKey());
                     if (exist == null)
                         continue;
 
                     ArrayList<Action> l = new ArrayList<Action>();
-                    for(Action e : exist) {
+                    for (Action e : exist) {
                         String id = e.getId();
                         boolean found = false;
-                        for(Action a : entry.getValue()) {
-                            if(id.equals(a.getId())) {
+                        for (Action a : entry.getValue()) {
+                            if (id.equals(a.getId())) {
                                 found = true;
                                 break;
                             }
                         }
-                        if(found) l.add(e);
+                        if (found)
+                            l.add(e);
                     }
-                    if(!l.isEmpty()) result.put(entry.getKey(), l);
+                    if (!l.isEmpty())
+                        result.put(entry.getKey(), l);
                 }
 
                 current = result;
@@ -228,7 +228,9 @@ public class ModeledActions extends DynamicMenuContribution implements IExecutab
 
         } catch (InvalidContribution e) {
             Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
-                    "Invalid contribution encountered in " + getClass().getSimpleName() + ".", e));
+                    NLS.bind(Messages.ModeledActions_ActivatorInvalidContributionsEncounteredIn,
+                            getClass().getSimpleName()),
+                    e));
         }
         return NONE;
     }
index 5f3d55ff04968845f96f27b46ae527b87bc1810f..c420904b48c03cb520c8dcdffa441efcb8f9f68a 100644 (file)
@@ -48,12 +48,12 @@ public class ModeledDoubleClickActions implements IDoubleClickAction, IExecutabl
     public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
        if(data instanceof String) {
                String str = (String)data;
-               String[] parms = str.split(";");
+               String[] parms = str.split(";"); //$NON-NLS-1$
                for(String parm : parms) {
-                       String[] keyValue = parm.split("=");
+                       String[] keyValue = parm.split("="); //$NON-NLS-1$
                        if(keyValue.length == 2) {
                                String key = keyValue[0].trim();
-                               if("context".equals(key)) {
+                               if("context".equals(key)) { //$NON-NLS-1$
                                        browseContexts = Collections.singleton(keyValue[1]);
                                }
                        }
index fafaa7e51a09c4cad73590aa925fc3dc2c4c1671..a07fe933a4976d3631e95b36919f6a7f432d888f 100644 (file)
@@ -35,7 +35,7 @@ public class NewComponentTypeAction implements ActionFactory {
         return new Runnable() {
             @Override
             public void run() {
-                Job job = new DatabaseJob("New User Component") {
+                Job job = new DatabaseJob(Messages.NewComponentTypeAction_NewUserComponent) {
                     @Override
                     protected IStatus run(IProgressMonitor monitor) {
                         try {
@@ -48,7 +48,7 @@ public class NewComponentTypeAction implements ActionFactory {
                             });
                             return Status.OK_STATUS;
                         } catch (DatabaseException e) {
-                            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Failed to create new user component.", e); 
+                            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.NewComponentTypeAction_ActivatorFailedToCreateNewUserComponent, e); 
                         }
                     }
                 };
index d73adc421be2afc70c0e15a3c089f34e3b2016e8..2d6074ec8bd7583d9dbd848a2a977b5d071a1eca 100644 (file)
@@ -91,7 +91,7 @@ public class NewConnectionPoint implements ActionFactory {
                                     name = sb.toString();
                                 } else {
                                     // domains.size() == 1
-                                    name = NameUtils.getSafeName(graph, _res) + " (" + graph.getURI(domains.iterator().next()) + ")";
+                                    name = NameUtils.getSafeName(graph, _res) + " (" + graph.getURI(domains.iterator().next()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
                                 }
                                 map.put(_res, new Pair<String, ImageDescriptor>(name, null));
                                 
@@ -116,12 +116,12 @@ public class NewConnectionPoint implements ActionFactory {
                         }
                         String createConnectionPointComment(ReadGraph graph, Resource target, Resource[] cps) throws DatabaseException {
                             StringBuilder result = new StringBuilder();
-                            result.append("Created connection point");
+                            result.append("Created connection point"); //$NON-NLS-1$
                             if (cps.length > 1)
                                 result.append('s');
-                            result.append(" for ")
+                            result.append(" for ") //$NON-NLS-1$
                             .append(NameUtils.getSafeName(graph, componentType))
-                            .append(":\n");
+                            .append(":\n"); //$NON-NLS-1$
                             for (int i = 0; i < cps.length; ++i) {
                                 result.append('\t');
                                 result.append(NameUtils.getSafeName(graph, cps[i]));
@@ -162,7 +162,7 @@ public class NewConnectionPoint implements ActionFactory {
     private Resource[] queryCps(Map<Resource, Pair<String, ImageDescriptor>> map) {
 
         Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-        ResourceSelectionDialog3<Resource> dialog = new ResourceSelectionDialog3<Resource>(shell, map, "Select connection point type") {
+        ResourceSelectionDialog3<Resource> dialog = new ResourceSelectionDialog3<Resource>(shell, map, Messages.NewConnectionPoint_SelectConnectionPointType) {
             @Override
             protected IDialogSettings getBaseDialogSettings() {
                 return Activator.getDefault().getDialogSettings();
index 0efcc5b8c4cf695fb8f33e3400e9d72c8ccb3783..37a733a966ea3027273a44461b27e524c70f90d9 100644 (file)
@@ -29,7 +29,7 @@ public class NewDocument implements ActionFactory {
                         Layer0 L0 = Layer0.getInstance(graph);
                         DocumentResource DOC = DocumentResource.getInstance(graph);
 
-                        String name = NameUtils.findFreshEscapedName(graph, "Document", model, L0.ConsistsOf);
+                        String name = NameUtils.findFreshEscapedName(graph, "Document", model, L0.ConsistsOf); //$NON-NLS-1$
 
                         // Create DOC.WikiDocument instance
                         Resource wikiDocument = graph.newResource();
@@ -41,13 +41,13 @@ public class NewDocument implements ActionFactory {
                         Resource documentType = graph.getSingleObject(DOC.WikiDocument_WikiDocumentBinding, DOC.DocumentTypeBinding_HasDocumentType);
                         Resource document = graph.newResource();
                         graph.claim(document, L0.InstanceOf, null, DOC.ScenegraphDocument);
-                        graph.claimLiteral(document, L0.HasName, "Documentation");
+                        graph.claimLiteral(document, L0.HasName, "Documentation"); //$NON-NLS-1$
                         graph.claim(wikiDocument, DOC.HasDocumentation, document);
                         graph.claim(document, L0.PartOf, wikiDocument);
 
                         Resource scenegraph = graph.newResource();
                         graph.claim(scenegraph, L0.InstanceOf, null, documentType);
-                        graph.claimLiteral(scenegraph, L0.HasName, "Scenegraph");
+                        graph.claimLiteral(scenegraph, L0.HasName, "Scenegraph"); //$NON-NLS-1$
                         graph.claim(scenegraph, L0.PartOf, document);
                         graph.claim(document, DOC.ScenegraphDocument_scenegraph, scenegraph);
 
index d6205ea5f5696bcac491d44778ffdf0597506d06..c999b98d8312fd6134804eaa3bc9983b103e6a01 100644 (file)
@@ -39,12 +39,12 @@ public class NewLibrary implements ActionFactory {
         Layer0 l0 = Layer0.getInstance(graph);
 
         Resource library = graph.newResource();
-        String name = NameUtils.findFreshName(graph, "Library", parent, l0.ConsistsOf);
+        String name = NameUtils.findFreshName(graph, Messages.NewLibrary_Library, parent, l0.ConsistsOf);
         graph.claim(library, l0.InstanceOf, null, l0.Library);
         graph.addLiteral(library, l0.HasName, l0.NameOf, l0.String, name, Bindings.STRING);
         graph.claim(library, l0.PartOf, parent);
 
-        Layer0Utils.addCommentMetadata(graph, "Created new Library named " + name + ", resource " + library);
+        Layer0Utils.addCommentMetadata(graph, "Created new Library named " + name + ", resource " + library); //$NON-NLS-1$ //$NON-NLS-2$
 
         return library;
     }
index daa21c384d2cc94e48a9b02899c925e33d363e96..3169275493d27f2855b845445840def6ab1eeb0e 100644 (file)
@@ -63,8 +63,8 @@ public class NewProceduralComponentType implements ActionFactory {
         // Name
         String defaultName = graph.getRelatedValue(indexRoot, MOD.StructuralModel_HasDefaultComponentTypeName, Bindings.STRING);
         String name = NameUtils.findFreshName(graph, defaultName, library);
-        graph.claimLiteral(componentType, L0.HasName, name + "@1");
-        graph.claimLiteral(componentType, L0X.HasGeneratedNamePrefix, "");
+        graph.claimLiteral(componentType, L0.HasName, name + "@1"); //$NON-NLS-1$
+        graph.claimLiteral(componentType, L0X.HasGeneratedNamePrefix, ""); //$NON-NLS-1$
 
         // Substructure
 //        Resource substructureType = graph.getSingleObject(indexRoot, MOD.StructuralModel_HasComponentTypeSubstructureType);
@@ -83,13 +83,13 @@ public class NewProceduralComponentType implements ActionFactory {
 //        }
 
         graph.addLiteral(componentType, STR.ProceduralComponentType_code, STR.ProceduralComponentType_code_Inverse, 
-                STR.ProceduralComponentTypeCode, "[]", Bindings.STRING);
+                STR.ProceduralComponentTypeCode, "[]", Bindings.STRING); //$NON-NLS-1$
         
         Resource symbolDiagramType = graph.getPossibleObject(indexRoot, MOD.StructuralModel_HasSymbolDiagramType);
         if(symbolDiagramType == null) symbolDiagramType = DIA.Composite;
         
         // Symbol
-        Resource symbol = new ModelingUtils(graph).createSymbol2("Symbol", symbolDiagramType);
+        Resource symbol = new ModelingUtils(graph).createSymbol2("Symbol", symbolDiagramType); //$NON-NLS-1$
         graph.claim(componentType, MOD.ComponentTypeToSymbol, symbol);
         graph.claim(componentType, L0.ConsistsOf, symbol);
         
@@ -107,7 +107,7 @@ public class NewProceduralComponentType implements ActionFactory {
         return new Runnable() {
             @Override
             public void run() {
-                Job job = new DatabaseJob("New User Component") {
+                Job job = new DatabaseJob(Messages.NewProceduralComponentType_NewUserComponent) {
                     @Override
                     protected IStatus run(IProgressMonitor monitor) {
                         try {
@@ -116,12 +116,12 @@ public class NewProceduralComponentType implements ActionFactory {
                                 public void perform(WriteGraph graph) throws DatabaseException {
                                     graph.markUndoPoint();
                                     Resource r = NewProceduralComponentType.create(graph, library);
-                                    Layer0Utils.addCommentMetadata(graph, "Created new Procedural Component Type " + graph.getPossibleRelatedValue2(r, Layer0.getInstance(graph).HasName, Bindings.STRING));
+                                    Layer0Utils.addCommentMetadata(graph, "Created new Procedural Component Type " + graph.getPossibleRelatedValue2(r, Layer0.getInstance(graph).HasName, Bindings.STRING)); //$NON-NLS-1$
                                 }
                             });
                             return Status.OK_STATUS;
                         } catch (DatabaseException e) {
-                            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Failed to create new user component.", e); 
+                            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.NewProceduralComponentType_ActivatorFailedToCreateNewUserComponent, e); 
                         }
                     }
                 };
index 2e8a8fcb81c8388f79804e15198b511c3f357a6f..f7bfdf0e2da40114144913057d0d50203aa8ff94 100644 (file)
@@ -35,7 +35,7 @@ public class NewSubscription implements ActionFactory {
                         
                         Layer0 l0 = Layer0.getInstance(g);
                         ModelingResources wr = ModelingResources.getInstance(g);
-                        String freshLabel = NameUtils.findFreshLabel(g, "Subscription", model);
+                        String freshLabel = NameUtils.findFreshLabel(g, Messages.NewSubscription_Subscription, model);
                         @SuppressWarnings("unused")
                         Resource subscription = GraphUtils.create2(g, wr.Subscription,
                                 l0.HasName, UUID.randomUUID().toString(),
@@ -43,7 +43,7 @@ public class NewSubscription implements ActionFactory {
                                 l0.PartOf, model);
                         
                         CommentMetadata cm = g.getMetadata(CommentMetadata.class);
-                        g.addMetadata(cm.add("Created subscription folder " + freshLabel));
+                        g.addMetadata(cm.add("Created subscription folder " + freshLabel)); //$NON-NLS-1$
                     }
                 });
             }
index 75bde31781e929abf8010076985670a92aaea96e..0c8b2573efd8f536dce9e2b4229df1ee2af44162 100644 (file)
@@ -51,7 +51,7 @@ public class RenameDiagramComponents implements ActionFactory {
                         });
                     }
                 } catch (DatabaseException e) {
-                    Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "RenameDiagramComponents action failed, see exception for details", e));
+                    Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.RenameDiagramComponents_ActivatorRenameDiaActionFailed, e));
                 }
             }
         };
index bc0b5cbe0d7cf88e2f95fcc1682bb29f3372fa73..93f69e25724beb1de9dba3a82e4592b0fb378c8c 100644 (file)
@@ -121,7 +121,7 @@ public class SetInitialState extends DynamicMenuContribution {
                     @Override
                     public void fill(Menu menu, int index) {
                         MenuItem setInitialState = new MenuItem(menu, SWT.CASCADE, index);
-                        setInitialState.setText("Set Initial State");
+                        setInitialState.setText(Messages.SetInitialState_SetInitialState);
                         Menu subMenu = new Menu(menu);
                         setInitialState.setMenu(subMenu);
 
index 193334e0b67789699358ebfee44d61b940cf0749..d8115f53e432396d166973d5f3bc25432bd7f3ba 100644 (file)
@@ -86,7 +86,7 @@ public class SwitchComponentTypeContribution extends ContributionItem {
         try {
             groups = Simantics.getSession().syncRequest(new ComponentSwitchGroupQuery(resource));
         } catch (DatabaseException e) {
-            LOGGER.error("Retrieval of switch groups failed.", e);
+            LOGGER.error("Retrieval of switch groups failed.", e); //$NON-NLS-1$
             return;
         }
         
@@ -160,7 +160,7 @@ public class SwitchComponentTypeContribution extends ContributionItem {
                     if(label == null) {
                         label = graph.getPossibleRelatedValue(group, L0.HasName);
                         if(label == null)
-                            label = "Alternative types";
+                            label = Messages.SwitchComponentTypeContribution_AlternativeTypes;
                     }
                     groupObj = new SwitchGroup(label);
                 }
diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/WorkbenchMessages.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/WorkbenchMessages.java
new file mode 100644 (file)
index 0000000..36ed5b8
--- /dev/null
@@ -0,0 +1,16 @@
+package org.simantics.modeling.ui.actions;
+
+import org.eclipse.osgi.util.NLS;
+
+public class WorkbenchMessages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.modeling.ui.actions.messages"; //$NON-NLS-1$
+       public static String AssignSymbolGroupsDialog_NewDots;
+       public static String AssignSymbolGroupsDialog_RemoveAnd;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, WorkbenchMessages.class);
+       }
+
+       private WorkbenchMessages() {
+       }
+}
index f3ed6365f7c572efd308d109592614dd0519d0cf..a19df0e2d0593f929cba0efc5e82ddfbfeec9bcd 100644 (file)
@@ -117,7 +117,7 @@ public class GlobalModeledToolbarActions {
         public void exception(Throwable t) {
             Activator.getDefault().getLog().log(
                     new Status(IStatus.ERROR, Activator.PLUGIN_ID,
-                            "Global modeled toolbar contribution listener ran into an unexpected exception.",
+                            Messages.GlobalModeledToolbarActions_ActivatorGlobalModeledToolbarException,
                             t));
         }
 
@@ -155,7 +155,7 @@ public class GlobalModeledToolbarActions {
         } catch (InvalidContribution e) {
             Activator.getDefault().getLog().log(
                     new Status(IStatus.ERROR, Activator.PLUGIN_ID,
-                            "Encountered invalid modeled contribution(s) while loading global modeled toolbar contributions.",
+                            Messages.GlobalModeledToolbarActions_ActivatorEncounteredInvalidContributionException,
                             e));
         }
 
@@ -185,7 +185,7 @@ public class GlobalModeledToolbarActions {
                 if (first)
                     first = false;
                 else
-                    items.add(new Separator(category == null ? "" : category.getLabel()));
+                    items.add(new Separator(category == null ? "" : category.getLabel())); //$NON-NLS-1$
                 for (Action action : actions)
                     items.add(new ActionContributionItem(action));
             }
index 84eab0eb7629f01eee5a106db64eac9647b8cc34..e21e67455639fd2ff3b0e23f2d602edae7f23074 100644 (file)
@@ -90,9 +90,9 @@ public class ImportSVGPNG {
                     }
                 });
 
-                IEditorPart[] eps = rfe.findEditors(new ResourceEditorInput("org.simantics.modeling.ui.symbolEditor", symbolEditorInput));
+                IEditorPart[] eps = rfe.findEditors(new ResourceEditorInput("org.simantics.modeling.ui.symbolEditor", symbolEditorInput)); //$NON-NLS-1$
                 if (eps.length == 0) {
-                    System.out.println("symbol editor part not found from multi page editor part: " + ap);
+                    System.out.println("symbol editor part not found from multi page editor part: " + ap); //$NON-NLS-1$
                     return;
                 }
                 viewer = eps[0];
@@ -105,12 +105,12 @@ public class ImportSVGPNG {
         }
         ICanvasContext ctx = (ICanvasContext) viewer.getAdapter(ICanvasContext.class);
         if (ctx == null) {
-            System.out.println("No canvas context");
+            System.out.println("No canvas context"); //$NON-NLS-1$
             return;
         }
         MouseInfo minfo = ctx.getSingleItem(MouseUtil.class).getMousePressedInfo(0);
         if(minfo == null) {
-            System.out.println("No mouse info");
+            System.out.println("No mouse info"); //$NON-NLS-1$
             return;
         }
         final Point2D mpos = minfo.canvasPosition;
@@ -127,8 +127,8 @@ public class ImportSVGPNG {
         Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
 
         FileDialog dialog = new FileDialog(shell);
-        dialog.setText("Choose an image to be imported");
-        dialog.setFilterExtensions(new String[] {"*.svg", "*.png"});
+        dialog.setText(Messages.ImportSVGPNG_ChooseImportImage);
+        dialog.setFilterExtensions(new String[] {"*.svg", "*.png"}); //$NON-NLS-1$ //$NON-NLS-2$
 
         final String filename = dialog.open();
         if(filename == null)
@@ -142,7 +142,7 @@ public class ImportSVGPNG {
 
                 @Override
                 public void perform(WriteGraph g) throws DatabaseException {
-                    Object svg = Commands.get(g, "Simantics/Diagram/createSVGElementR")
+                    Object svg = Commands.get(g, "Simantics/Diagram/createSVGElementR") //$NON-NLS-1$
                             .execute(g, g.syncRequest(new IndexRoot(composite)),
                                      composite, suffix(filename), data, mposX, mposY);
 
diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/e4/Messages.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/e4/Messages.java
new file mode 100644 (file)
index 0000000..443c445
--- /dev/null
@@ -0,0 +1,17 @@
+package org.simantics.modeling.ui.actions.e4;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.modeling.ui.actions.e4.messages"; //$NON-NLS-1$
+       public static String GlobalModeledToolbarActions_ActivatorEncounteredInvalidContributionException;
+       public static String GlobalModeledToolbarActions_ActivatorGlobalModeledToolbarException;
+       public static String ImportSVGPNG_ChooseImportImage;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/e4/messages.properties b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/e4/messages.properties
new file mode 100644 (file)
index 0000000..2dd0baf
--- /dev/null
@@ -0,0 +1,3 @@
+GlobalModeledToolbarActions_ActivatorEncounteredInvalidContributionException=Encountered invalid modeled contribution(s) while loading global modeled toolbar contributions.\r
+GlobalModeledToolbarActions_ActivatorGlobalModeledToolbarException=Global modeled toolbar contribution listener ran into an unexpected exception.\r
+ImportSVGPNG_ChooseImportImage=Choose an image to be imported\r
diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/messages.properties b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/messages.properties
new file mode 100644 (file)
index 0000000..57f9e15
--- /dev/null
@@ -0,0 +1,43 @@
+AssignSymbolGroup_AreYouSureToRemoveSymbolGroup=Are you sure you want to remove symbol group ''{0}'' ?
+AssignSymbolGroup_AreYouSureToRemoveSymbolGroup1=Are you sure you want to remove {0} symbol groups?
+AssignSymbolGroup_ConfirmRemoval=Confirm removal
+AssignSymbolGroup_GroupSymbolAlreadyExists=A symbol group with that name already exists.
+AssignSymbolGroup_NameMustNotBeEmpty=The name must be non-empty.
+AssignSymbolGroup_NewSymbolGroup=New Symbol Group
+AssignSymbolGroup_SameModelRequired=Same Model Required
+AssignSymbolGroup_SameModelRequiredMsg=All the selected symbols must be from within the same model.
+AssignSymbolGroup_SelectSymbolGroupsTheSelectedSymbolIsShownIn=Select symbol groups the selected symbol is shown in.
+AssignSymbolGroup_SelectSymbolGroupsTheSelectedSymbolsAreShownIn=Select symbol groups the selected {0} symbols are shown in.
+AssignSymbolGroup_SymbolGroupAssignments=Symbol Group Assignments
+AssignSymbolGroup_WriteSymbolGroupName=Write the name of the new symbol group.
+AssignSymbolGroupsDialog_NewDots=&New...
+AssignSymbolGroupsDialog_RemoveAnd=&Remove
+CompilePGraphsAction_CompilePGraphs=Compile PGraphs
+CompilePGraphsAction_Continue=Continue
+CompilePGraphsAction_FollowingIssuesFound=The following issues were found:
+CompilePGraphsAction_ProblemsinOntologyDefinitionFile=Problems in the Ontology Definition File
+ConfigureConnectionTypes_ConnectionTypeAssignments=Connection Type Assignments
+ConfigureConnectionTypes_SameModelRequired=Same Model Required
+ConfigureConnectionTypes_SameModelRequiredMsg=All the selected connection points must be from within the same index root.
+ConfigureConnectionTypes_SelectConnectionTypeForSelectedConnectionPoint=Select connection types for the selected connection point
+ConfigureConnectionTypes_SelectConnectionTypeForSelectedConnectionPoints=Select connection types for the selected connection points
+Copy_Copy=Copy
+ExpandFlagsHandler_MonitorExpandFlags=Expand Flags
+ImportSVG_ChooseImportImage=Choose an image to be imported
+MergeFlagsAction_CollectFlag=Collect flags
+MergeFlagsAction_ExpandCompositeSet=Expand Composite Set
+MergeFlagsAction_MonitorMergeCollectedFlags=Merge collected flags
+MergeFlagsAction_MonitorMergeFlags=Merge Flags
+MergeFlagsHandler_MonitorMergeSelectedFlags=Merge Selected Flags
+MergeRelatedFlagsHandler_MonitorMergeRelatedFlags=Merge Related Flags
+ModeledActions_ActivatorInvalidContributionsEncounteredIn=Invalid contribution encountered in {0}
+NewComponentTypeAction_ActivatorFailedToCreateNewUserComponent=Failed to create new user component.
+NewComponentTypeAction_NewUserComponent=New User Component
+NewConnectionPoint_SelectConnectionPointType=Select connection point type
+NewLibrary_Library=Library
+NewProceduralComponentType_ActivatorFailedToCreateNewUserComponent=Failed to create new user component.
+NewProceduralComponentType_NewUserComponent=New User Component
+NewSubscription_Subscription=Subscription
+RenameDiagramComponents_ActivatorRenameDiaActionFailed=RenameDiagramComponents action failed, see exception for details
+SetInitialState_SetInitialState=Set Initial State
+SwitchComponentTypeContribution_AlternativeTypes=Alternative types
index 5245089190e8434b118021f2d0f783a39d9eec59..22a61e2a19fbada135c1849532c07042543181c3 100644 (file)
@@ -16,6 +16,7 @@ import javax.swing.JDialog;
 import javax.swing.JPanel;
 import javax.swing.JTabbedPane;
 
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.simantics.utils.strings.format.MetricsFormat;
 
 public class AWTStyleDialog extends JDialog {
@@ -33,7 +34,7 @@ public class AWTStyleDialog extends JDialog {
        private boolean useFormat = true;
        
        public AWTStyleDialog(Frame owner,boolean useFont, boolean useColor, boolean useFormat) {
-               super(owner,"Style",true);
+               super(owner,Messages.AWTStyleDialog_Style,true);
                this.useFont = useFont;
                this.useColor = useColor;
                this.useFormat = useFormat;
@@ -42,7 +43,7 @@ public class AWTStyleDialog extends JDialog {
        
        public AWTStyleDialog(boolean useFont, boolean useColor, boolean useFormat) {
                super();
-               setTitle("Style");
+               setTitle(Messages.AWTStyleDialog_Style);
                setModal(true);
                this.useFont = useFont;
                this.useColor = useColor;
@@ -52,41 +53,42 @@ public class AWTStyleDialog extends JDialog {
        
        public void setStartFont(Font font) {
                if (!useFont)
-                       throw new RuntimeException("Dialog is not configured with font support");
+                       throw new RuntimeException("Dialog is not configured with font support"); //$NON-NLS-1$
                fontChooser.setCurrentFont(font);
        }
        
        public void setStartColor(Color color) {
                if (!useColor)
-                       throw new RuntimeException("Dialog is not configured with color support");
+                       throw new RuntimeException("Dialog is not configured with color support"); //$NON-NLS-1$
                colorChooser.setColor(color);
        }
        
        public void setStartFormat(MetricsFormat format) {
                if (!useFormat)
-                       throw new RuntimeException("Dialog is not configured with format support");
+                       throw new RuntimeException("Dialog is not configured with format support"); //$NON-NLS-1$
                metricsEditor.setMetricsFormat(format);
        }
        
        private void createContents() {
-               
+
                JTabbedPane tabbedPane = new JTabbedPane();
-               getContentPane().add(tabbedPane,BorderLayout.CENTER);
+               getContentPane().add(tabbedPane, BorderLayout.CENTER);
                if (useFont)
-                       tabbedPane.addTab("Font", fontChooser = new FontChooser("Sample text"));
+                       tabbedPane.addTab(Messages.AWTStyleDialog_Font,
+                                       fontChooser = new FontChooser(Messages.AWTStyleDialog_SampleText));
                if (useColor)
-                       tabbedPane.addTab("Color",colorChooser = new JColorChooser(new Color(0, 0, 0)));
+                       tabbedPane.addTab(Messages.AWTStyleDialog_Color, colorChooser = new JColorChooser(new Color(0, 0, 0)));
                if (useFormat)
-                       tabbedPane.addTab("Metrics",metricsEditor = new MetricsEditor());
-               
+                       tabbedPane.addTab(Messages.AWTStyleDialog_Metrics, metricsEditor = new MetricsEditor());
+
                JPanel controlPanel = new JPanel();
-               getContentPane().add(controlPanel,BorderLayout.SOUTH);
+               getContentPane().add(controlPanel, BorderLayout.SOUTH);
                controlPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
-               
-               JButton okButton = new JButton("OK");
+
+               JButton okButton = new JButton(IDialogConstants.OK_LABEL);
                controlPanel.add(okButton);
                okButton.addActionListener(new ActionListener() {
-                       
+
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                cancelled = false;
@@ -94,42 +96,41 @@ public class AWTStyleDialog extends JDialog {
                                AWTStyleDialog.this.dispose();
                        }
                });
-               
-               JButton cancelButton = new JButton("Cancel");
+
+               JButton cancelButton = new JButton(IDialogConstants.CANCEL_LABEL);
                controlPanel.add(cancelButton);
                cancelButton.addActionListener(new ActionListener() {
-                       
+
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                AWTStyleDialog.this.setVisible(false);
                                AWTStyleDialog.this.dispose();
                        }
                });
-               
-               
+
                this.addWindowListener(new WindowListener() {
-                       
+
                        @Override
                        public void windowOpened(WindowEvent arg0) {}
-                       
+
                        @Override
                        public void windowIconified(WindowEvent arg0) {}
-                       
+
                        @Override
                        public void windowDeiconified(WindowEvent arg0) {}
-                       
+
                        @Override
                        public void windowDeactivated(WindowEvent arg0) {}
-                       
+
                        @Override
                        public void windowClosing(WindowEvent arg0) {
                                if (metricsEditor != null)
                                        metricsEditor.dispose();
                        }
-                       
+
                        @Override
                        public void windowClosed(WindowEvent arg0) {}
-                       
+
                        @Override
                        public void windowActivated(WindowEvent arg0) {}
                });
index 9db3a2401d7a449fe711bef4ce492edf6520c7ee..d3b042e5fadcc5295bfa4f0c36b88ca307186f47 100644 (file)
@@ -52,11 +52,11 @@ import org.simantics.utils.ui.ErrorLogger;
  */
 public class EditStyle {
 
-    private static final String SECTION_AWT_STYLE_DIALOG = "AWTStyleDialog";
-    private static final String SETTING_DIALOG_HEIGHT    = "h";
-    private static final String SETTING_DIALOG_WIDTH     = "w";
-    private static final String SETTING_DIALOG_Y         = "y";
-    private static final String SETTING_DIALOG_X         = "x";
+    private static final String SECTION_AWT_STYLE_DIALOG = "AWTStyleDialog"; //$NON-NLS-1$
+    private static final String SETTING_DIALOG_HEIGHT    = "h"; //$NON-NLS-1$
+    private static final String SETTING_DIALOG_WIDTH     = "w"; //$NON-NLS-1$
+    private static final String SETTING_DIALOG_Y         = "y"; //$NON-NLS-1$
+    private static final String SETTING_DIALOG_X         = "x"; //$NON-NLS-1$
 
     public static void openStyleDialog(final Resource[] resources) {
         if (resources.length == 0)
@@ -125,10 +125,10 @@ public class EditStyle {
                 final boolean useColor = hasColor;
                 final boolean useFormat = hasFormat;
 
-                Job job = new Job("Open Style Dialog") {
+                Job job = new Job(Messages.EditStyle_OpenStyleDialog) {
                     @Override
                     protected IStatus run(IProgressMonitor monitor) {
-                        monitor.beginTask("Open dialog", IProgressMonitor.UNKNOWN);
+                        monitor.beginTask(Messages.EditStyle_MonitorOpenDialog, IProgressMonitor.UNKNOWN);
                         SwingUtilities.invokeLater(new Runnable() {
                             @Override
                             public void run() {
index 85524e2ed9d0299b2e57a652b4c2d467d2d650e6..3580b82b6414333cae7c2d39faf17e11f1ab17c3 100644 (file)
@@ -27,7 +27,7 @@ public class FontChooser extends JPanel {
 
     private static final long serialVersionUID = -53650261362110193L;
 
-    private static Font DEFAULT_FONT = new Font("Arial", Font.PLAIN, 16);
+    private static Font DEFAULT_FONT = new Font(Messages.FontChooser_DefaultFont, Font.PLAIN, 16);
 
     private String sampleText;
     private JLabel text;
@@ -59,7 +59,7 @@ public class FontChooser extends JPanel {
         GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
         String[] ff = ge.getAvailableFontFamilyNames();
         fonts = new String[ff.length + 1];
-        fonts[0] = "-- keep current font --";
+        fonts[0] = Messages.FontChooser_KeepCurrentFont;
         System.arraycopy(ff, 0, fonts, 1, ff.length);
 
         fontList = new JList(fonts);
@@ -102,14 +102,14 @@ public class FontChooser extends JPanel {
         sizeComboBox = new JComboBox(sizes);
         sizeComboBox.addActionListener(listener);
         sizeComboBox.setSelectedIndex(7);
-        controlPanel.add(new JLabel("Size: "));
+        controlPanel.add(new JLabel(Messages.FontChooser_Size));
         controlPanel.add(sizeComboBox);
 
-        boldCheckBox = new JCheckBox("Bold");
+        boldCheckBox = new JCheckBox(Messages.FontChooser_Bold);
         boldCheckBox.addActionListener(listener);
         controlPanel.add(boldCheckBox);
 
-        italicCheckBox = new JCheckBox("Italic");
+        italicCheckBox = new JCheckBox(Messages.FontChooser_Italic);
         italicCheckBox.addActionListener(listener);
         controlPanel.add(italicCheckBox);
 
diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/Messages.java b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/Messages.java
new file mode 100644 (file)
index 0000000..5973ddd
--- /dev/null
@@ -0,0 +1,46 @@
+package org.simantics.modeling.ui.actions.style;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "org.simantics.modeling.ui.actions.style.messages"; //$NON-NLS-1$
+       public static String AWTStyleDialog_Color;
+       public static String AWTStyleDialog_Font;
+       public static String AWTStyleDialog_Metrics;
+       public static String AWTStyleDialog_SampleText;
+       public static String AWTStyleDialog_Style;
+       public static String EditStyle_MonitorOpenDialog;
+       public static String EditStyle_OpenStyleDialog;
+       public static String FontChooser_DefaultFont;
+       public static String FontChooser_Bold;
+       public static String FontChooser_Italic;
+       public static String FontChooser_KeepCurrentFont;
+       public static String FontChooser_Size;
+       public static String MetricsEditor_AddFormatTemplate;
+       public static String MetricsEditor_AddFormatTemplateTT;
+       public static String MetricsEditor_Format;
+       public static String MetricsEditor_FormatError;
+       public static String MetricsEditor_FormatName;
+       public static String MetricsEditor_FormatPattern;
+       public static String MetricsEditor_FormatPatternNotCorrect;
+       public static String MetricsEditor_Name;
+       public static String MetricsEditor_NewFormat;
+       public static String MetricsEditor_NewFormatField;
+       public static String MetricsEditor_NewFormatTT;
+       public static String MetricsEditor_Numbers;
+       public static String MetricsEditor_RemoveTemplate;
+       public static String MetricsEditor_RemoveTemplateTT;
+       public static String MetricsEditor_UpdateTemplate;
+       public static String MetricsEditor_UpdateTemplateTT;
+       public static String MetricsEditor_Value;
+       public static String MetricsEditor_ValuePresentation;
+       public static String MetricsEditor_ValueTest;
+       public static String MetricsEditor_ValueTestNotANumber;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index ca9ca5fe140bad1b3efbd1c3b3fa5453a8814497..19dae4057e293bb82c4432bcc5956f159f6e745c 100644 (file)
@@ -21,6 +21,7 @@ import javax.swing.event.TableModelEvent;
 import javax.swing.event.TableModelListener;
 import javax.swing.table.TableModel;
 
+import org.eclipse.osgi.util.NLS;
 import org.simantics.utils.strings.format.MetricsFormat;
 import org.simantics.utils.strings.format.MetricsFormatList;
 import org.simantics.utils.strings.format.MetricsFormatListListener;
@@ -60,13 +61,13 @@ public class MetricsEditor extends JPanel {
         panel.add(fieldPanel,BorderLayout.CENTER);
 
 
-        labelPanel.add(new JLabel("Value test:"));
+        labelPanel.add(new JLabel(Messages.MetricsEditor_ValueTest));
         fieldPanel.add(valueTestField);
-        labelPanel.add(new JLabel("Value presentation:"));
+        labelPanel.add(new JLabel(Messages.MetricsEditor_ValuePresentation));
         fieldPanel.add(valuePresentationField);
-        labelPanel.add(new JLabel("Format name:"));
+        labelPanel.add(new JLabel(Messages.MetricsEditor_FormatName));
         fieldPanel.add(formatNameField);
-        labelPanel.add(new JLabel("Format pattern:"));
+        labelPanel.add(new JLabel(Messages.MetricsEditor_FormatPattern));
         fieldPanel.add(formatPatternField);
 
         add(panel,BorderLayout.NORTH);
@@ -85,8 +86,8 @@ public class MetricsEditor extends JPanel {
         add(controlPanel,BorderLayout.SOUTH);
         controlPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
 
-        JButton addTemplateButton = new JButton("Add Format Template");
-        addTemplateButton.setToolTipText("Add current format to templates");
+        JButton addTemplateButton = new JButton(Messages.MetricsEditor_AddFormatTemplate);
+        addTemplateButton.setToolTipText(Messages.MetricsEditor_AddFormatTemplateTT);
         controlPanel.add(addTemplateButton);
         addTemplateButton.addActionListener(new ActionListener() {
 
@@ -96,8 +97,8 @@ public class MetricsEditor extends JPanel {
             }
         });
 
-        JButton removeTemplateButton = new JButton("Remove Template");
-        removeTemplateButton.setToolTipText("Remove selected template");
+        JButton removeTemplateButton = new JButton(Messages.MetricsEditor_RemoveTemplate);
+        removeTemplateButton.setToolTipText(Messages.MetricsEditor_RemoveTemplateTT);
         controlPanel.add(removeTemplateButton);
         removeTemplateButton.addActionListener(new ActionListener() {
 
@@ -107,8 +108,8 @@ public class MetricsEditor extends JPanel {
             }
         });
 
-        JButton updateTemplateButton = new JButton("Update Template");
-        updateTemplateButton.setToolTipText("Update selected template using current format");
+        JButton updateTemplateButton = new JButton(Messages.MetricsEditor_UpdateTemplate);
+        updateTemplateButton.setToolTipText(Messages.MetricsEditor_UpdateTemplateTT);
         controlPanel.add(updateTemplateButton);
         updateTemplateButton.addActionListener(new ActionListener() {
 
@@ -118,8 +119,8 @@ public class MetricsEditor extends JPanel {
             }
         });
 
-        JButton newFormatButton = new JButton("New Format");
-        newFormatButton.setToolTipText("Create a new Format");
+        JButton newFormatButton = new JButton(Messages.MetricsEditor_NewFormat);
+        newFormatButton.setToolTipText(Messages.MetricsEditor_NewFormatTT);
         controlPanel.add(newFormatButton);
         newFormatButton.addActionListener(new ActionListener() {
 
@@ -144,8 +145,8 @@ public class MetricsEditor extends JPanel {
         valueTestField.addActionListener(l);
         formatPatternField.addActionListener(l);
 
-        valueTestField.setText("123456.789");
-        formatPatternField.setText("%s");
+        valueTestField.setText(Messages.MetricsEditor_Numbers);
+        formatPatternField.setText("%s"); //$NON-NLS-1$
 
         updateValues();
     }
@@ -189,8 +190,8 @@ public class MetricsEditor extends JPanel {
 
     private void newFormat() {
         format = null;
-        formatNameField.setText("New format");
-        formatPatternField.setText("%s");
+        formatNameField.setText(Messages.MetricsEditor_NewFormatField);
+        formatPatternField.setText("%s"); //$NON-NLS-1$
         updateValues();
     }
 
@@ -227,7 +228,7 @@ public class MetricsEditor extends JPanel {
         try {
             d = Double.parseDouble(value);
         } catch (NumberFormatException e) {
-            valuePresentationField.setText("Value test is not a number");
+            valuePresentationField.setText(Messages.MetricsEditor_ValueTestNotANumber);
             return;
         }
         formatValue = d;
@@ -236,7 +237,7 @@ public class MetricsEditor extends JPanel {
         try {
             format = createMetricsFormatFromFields();
         } catch (Exception e) {
-            valuePresentationField.setText("Format pattern is not correct " + e.getMessage());
+            valuePresentationField.setText(NLS.bind(Messages.MetricsEditor_FormatPatternNotCorrect, e.getMessage()));
         }
         if (format == null)
             return; // TODO : show error
@@ -255,7 +256,7 @@ public class MetricsEditor extends JPanel {
         try {
             valuePresentationField.setText(format.formatValue(formatValue));
         } catch (Exception e) {
-            valuePresentationField.setText("Format error: "  + e.getMessage());
+            valuePresentationField.setText(NLS.bind(Messages.MetricsEditor_FormatError, e.getMessage()));
         }
         formatNameField.setText(format.getName());
         formatPatternField.setText(format.getPattern());
@@ -267,7 +268,7 @@ public class MetricsEditor extends JPanel {
 
     private class MetricsTableModel implements TableModel, MetricsFormatListListener {
 
-        private String[] columnNames = {"Name","Format","Value"};
+        private String[] columnNames = {Messages.MetricsEditor_Name,Messages.MetricsEditor_Format,Messages.MetricsEditor_Value};
         private MetricsFormatList formatList;
         private double formatValue = 0;
 
@@ -301,7 +302,7 @@ public class MetricsEditor extends JPanel {
             } else if (columnIndex == 2) {
                 return format.formatValue(formatValue);
             }
-            throw new IndexOutOfBoundsException("There is no column " + columnIndex);
+            throw new IndexOutOfBoundsException("There is no column " + columnIndex); //$NON-NLS-1$
         }
 
         @Override
diff --git a/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/messages.properties b/bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/actions/style/messages.properties
new file mode 100644 (file)
index 0000000..c15f64f
--- /dev/null
@@ -0,0 +1,32 @@
+AWTStyleDialog_Color=Color
+AWTStyleDialog_Font=Font
+AWTStyleDialog_Metrics=Metrics
+AWTStyleDialog_SampleText=Sample text
+AWTStyleDialog_Style=Style
+EditStyle_MonitorOpenDialog=Open dialog
+EditStyle_OpenStyleDialog=Open Style Dialog
+FontChooser_DefaultFont=Arial
+FontChooser_Bold=Bold
+FontChooser_Italic=Italic
+FontChooser_KeepCurrentFont=-- keep current font --
+FontChooser_Size=Size: 
+MetricsEditor_AddFormatTemplate=Add Format Template
+MetricsEditor_AddFormatTemplateTT=Add current format to templates
+MetricsEditor_Format=Format
+MetricsEditor_FormatError=Format error: {}
+MetricsEditor_FormatName=Format name:
+MetricsEditor_FormatPattern=Format pattern:
+MetricsEditor_FormatPatternNotCorrect=Format pattern is not correct {0}
+MetricsEditor_Name=Name
+MetricsEditor_NewFormat=New Format
+MetricsEditor_NewFormatField=New format
+MetricsEditor_NewFormatTT=Create a new Format
+MetricsEditor_Numbers=123456.789
+MetricsEditor_RemoveTemplate=Remove Template
+MetricsEditor_RemoveTemplateTT=Remove selected template
+MetricsEditor_UpdateTemplate=Update Template
+MetricsEditor_UpdateTemplateTT=Update selected template using current format
+MetricsEditor_Value=Value
+MetricsEditor_ValuePresentation=Value presentation:
+MetricsEditor_ValueTest=Value test:
+MetricsEditor_ValueTestNotANumber=Value test is not a number
index c805087d4c1560f107bb4a609db6ee15b22c4d74..9ef7a33e79b3e1246528f484d2fdba8497d2b099 100644 (file)
@@ -60,7 +60,7 @@ public class ChartComposite extends ConfigurationComposite {
             public String perform(ReadGraph graph) throws DatabaseException {
                 Resource r = ResourceAdaptionUtils.toSingleResource(selection);
                 if (r == null)
-                    return "Selection";
+                    return "Selection"; //$NON-NLS-1$
                 return NameLabelUtil.modalName(graph, r);
             }
         };
@@ -93,7 +93,7 @@ public class ChartComposite extends ConfigurationComposite {
         GridDataFactory.fillDefaults().grab(true, false).span(3, 1).applyTo(nameText.getWidget());
 */
         Label autoscrollLabel = new Label(body, support, 0);
-        autoscrollLabel.setText("Auto-scroll settings:");
+        autoscrollLabel.setText(Messages.ChartComposite_AutoScrollSettings);
         autoscrollLabel.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
         GridDataFactory.fillDefaults().grab(false, false).span(1, 1).align(SWT.LEFT, SWT.CENTER).applyTo(autoscrollLabel.getControl());
         
@@ -103,7 +103,7 @@ public class ChartComposite extends ConfigurationComposite {
         GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(3).extendedMargins(5,5,5,5).applyTo(templateComposite);
 
         Label templateHeader = new Label(templateComposite, support, 0);
-        templateHeader.setText("Template");
+        templateHeader.setText(Messages.ChartComposite_Template);
         //templateHeader.setFont(smallFont);
         templateHeader.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
         GridDataFactory.fillDefaults().grab(false, false).span(1, 1).align(SWT.LEFT, SWT.CENTER).applyTo(templateHeader.getWidget());
@@ -115,7 +115,7 @@ public class ChartComposite extends ConfigurationComposite {
         GridDataFactory.fillDefaults().grab(true, false).span(1, 1).applyTo(templateCombo.getWidget());
 
         Button resetButton = new Button(templateComposite, support, SWT.NONE | SWT.READ_ONLY);
-        resetButton.setText("Apply");
+        resetButton.setText(Messages.ChartComposite_Apply);
         resetButton.addSelectionListener(new SelectionListenerImpl<Resource>(context) {
             @Override
             public void apply(WriteGraph graph, Resource monitor) throws DatabaseException {
@@ -137,13 +137,13 @@ public class ChartComposite extends ConfigurationComposite {
         GridLayoutFactory.fillDefaults().equalWidth(false).numColumns(4).extendedMargins(5,5,5,5).applyTo(buttonComposite);
 
         Label startHeader = new Label(buttonComposite, support, 0);
-        startHeader.setText("Start time");
+        startHeader.setText(Messages.ChartComposite_StartTime);
         //startHeader.setFont(smallFont);
         startHeader.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
         GridDataFactory.fillDefaults().grab(false, false).span(1, 1).align(SWT.LEFT, SWT.CENTER).applyTo(startHeader.getWidget());
 
         TrackedText timeWindowStart = new TrackedText(buttonComposite, support, SWT.BORDER | SWT.FLAT);
-        timeWindowStart.getWidget().setToolTipText("Chart Window Fixed Start Time in Seconds or Yy Dd HH:mm:ss.ddd");
+        timeWindowStart.getWidget().setToolTipText(Messages.ChartComposite_ChartWindowTT);
         timeWindowStart.setTextFactory(new TimePropertyFactory(ChartResource.URIs.Chart_TimeWindowStart));
         timeWindowStart.addModifyListener(new TimePropertyModifier(context, ChartResource.URIs.Chart_TimeWindowStart, START_VALIDATOR));
         timeWindowStart.setInputValidator( START_VALIDATOR );
@@ -154,13 +154,13 @@ public class ChartComposite extends ConfigurationComposite {
 //        l1.setText("seconds");
 
         Label sizeHeader = new Label(buttonComposite, support, 0);
-        sizeHeader.setText("Length");
+        sizeHeader.setText(Messages.ChartComposite_Length);
         //sizeHeader.setFont(smallFont);
         sizeHeader.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
         GridDataFactory.fillDefaults().grab(false, false).span(1, 1).align(SWT.LEFT, SWT.CENTER).applyTo(sizeHeader.getWidget());
 
         TrackedText timeWindowLength = new TrackedText(buttonComposite, support, SWT.BORDER | SWT.FLAT);
-        timeWindowLength.getWidget().setToolTipText("Chart Window Fixed Time Axis Length in Seconds or Yy Dd HH:mm:ss.ddd");
+        timeWindowLength.getWidget().setToolTipText(Messages.ChartComposite_ChartWindowTT2);
         timeWindowLength.setTextFactory(new TimePropertyFactory(ChartResource.URIs.Chart_TimeWindowLength));
         timeWindowLength.addModifyListener(new TimePropertyModifier(context, ChartResource.URIs.Chart_TimeWindowLength, LENGTH_VALIDATOR));
         timeWindowLength.setInputValidator( LENGTH_VALIDATOR );
@@