X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.document.linking.ui%2Fsrc%2Forg%2Fsimantics%2Fdocument%2Flinking%2Fviews%2FSourceView.java;h=86dfe67edc3bdb90783ff258200a7b5a9e007ac9;hp=e3b1c55d3ab4f0961f02383ad6a018b2a2bde025;hb=8783f9ee2b67f83160d88f43a7aef02a6b25f955;hpb=6431ba9c664c0b3c65c486397f610a514f246416 diff --git a/bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/views/SourceView.java b/bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/views/SourceView.java index e3b1c55d3..86dfe67ed 100644 --- a/bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/views/SourceView.java +++ b/bundles/org.simantics.document.linking.ui/src/org/simantics/document/linking/views/SourceView.java @@ -65,7 +65,7 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis /** * The ID of the view as specified by the extension. */ - public static final String ID = "org.simantics.document.linking.views.SourceView"; + public static final String ID = "org.simantics.document.linking.views.SourceView"; //$NON-NLS-1$ private Composite composite; @@ -110,10 +110,10 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis composite.setLayout(new FillLayout()); tabFolder = new TabFolder(composite, SWT.NONE); TabItem link = new TabItem(tabFolder, SWT.NONE); - link.setText("Linking"); + link.setText(Messages.SourceView_Linking); TabItem browse = new TabItem(tabFolder, SWT.NONE); - browse.setText("Browsing"); + browse.setText(Messages.SourceView_Browsing); linkComposite = new Composite(tabFolder, SWT.NONE); link.setControl(linkComposite); @@ -163,7 +163,7 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis } }); Button checkingButton = new Button(browseComposite, SWT.TOGGLE); - checkingButton.setText("All"); + checkingButton.setText(Messages.SourceView_All); checkingButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -171,7 +171,7 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis boolean checked = button.getSelection(); browseExplorer.dispose(); createModelExplorer(checked,support,browseComposite); - button.setText(checked ? "Old/Removed" : "All"); + button.setText(checked ? Messages.SourceView_OldRemoved : Messages.SourceView_All); if (currentModel != null) setModel(currentModel, true); browseComposite.getParent().layout(true, true); @@ -198,7 +198,7 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis } private void createModelExplorer(boolean onlyCheckable,WidgetSupport support,Composite browseComposite) { - browseExplorer = new SourceLinkExplorerComposite(ArrayMap.keys("displaySelectors", "displayFilter","treeView").values(false, false, true), selectionProvider,getSite(), browseComposite, support,false, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION); + browseExplorer = new SourceLinkExplorerComposite(ArrayMap.keys("displaySelectors", "displayFilter","treeView").values(false, false, true), selectionProvider,getSite(), browseComposite, support,false, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ if(!onlyCheckable) browseExplorer.setBrowseContexts(DocumentLink.URIs.ModelViewpointBrowseContext, DocumentLink.URIs.ModelViewpointActionContext); else @@ -207,7 +207,7 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis browseExplorer.setInputSource(new SingleSelectionInputSource(Resource.class)); browseExplorer.getExplorer().setAutoExpandLevel(2); // Expand everything in the beginning browseExplorer.setColumnsVisible(true); - browseExplorer.setContextMenuId("#SourceModelViewPopup"); + browseExplorer.setContextMenuId("#SourceModelViewPopup"); //$NON-NLS-1$ browseExplorer.finish(); ((Tree)browseExplorer.getExplorer().getControl()).setLinesVisible(true); @@ -215,25 +215,25 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis } private void createLinkTab(final Composite linkComposite) { - objectExplorer = new SourceLinkExplorerComposite(ArrayMap.keys("displaySelectors", "displayFilter","treeView").values(false, false,true), selectionProvider,getSite(), linkComposite, support, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION); + objectExplorer = new SourceLinkExplorerComposite(ArrayMap.keys("displaySelectors", "displayFilter","treeView").values(false, false,true), selectionProvider,getSite(), linkComposite, support, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ objectExplorer.setBrowseContexts(DocumentLink.URIs.SourceObjectViewpointBrowseContext, DocumentLink.URIs.SourceObjectViewpointActionContext); objectExplorer.setColumns(Constants.SOURCE_OBJECT_COLUMNS); objectExplorer.setInputSource(new SingleSelectionInputSource(Resource.class)); objectExplorer.getExplorer().setAutoExpandLevel(2); // Expand everything in the beginning objectExplorer.setColumnsVisible(true); - objectExplorer.setContextMenuId("#SourceObjectViewPopup"); + objectExplorer.setContextMenuId("#SourceObjectViewPopup"); //$NON-NLS-1$ objectExplorer.finish(); ((Tree)objectExplorer.getExplorer().getControl()).setLinesVisible(true); final Sash sash = new Sash (linkComposite, SWT.HORIZONTAL); - propertyExplorer = new SourceLinkExplorerComposite(ArrayMap.keys("displaySelectors", "displayFilter","treeView").values(false, false,true), selectionProvider,getSite(), linkComposite, support, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION); + propertyExplorer = new SourceLinkExplorerComposite(ArrayMap.keys("displaySelectors", "displayFilter","treeView").values(false, false,true), selectionProvider,getSite(), linkComposite, support, SWT.BORDER | SWT.SINGLE | SWT.FULL_SELECTION); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ propertyExplorer.setBrowseContexts(DocumentLink.URIs.SourcePropertyViewpointBrowseContext, DocumentLink.URIs.SourcePropertyViewpointActionContext); propertyExplorer.setColumns(Constants.SOURCE_COLUMNS); propertyExplorer.setInputSource(new SingleSelectionInputSource(Resource.class)); propertyExplorer.getExplorer().setAutoExpandLevel(2); // Expand everything in the beginning propertyExplorer.setColumnsVisible(true); - propertyExplorer.setContextMenuId("#SourcePropertyViewPopup"); + propertyExplorer.setContextMenuId("#SourcePropertyViewPopup"); //$NON-NLS-1$ propertyExplorer.finish(); ((Tree)propertyExplorer.getExplorer().getControl()).setLinesVisible(true); @@ -390,16 +390,16 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis } private void makeActions() { - pinSelectionAction = new Action("Pin selection", Action.AS_CHECK_BOX) { + pinSelectionAction = new Action(Messages.SourceView_PinSelection, Action.AS_CHECK_BOX) { public void run() { pinSelection = isChecked(); } }; // action1.setToolTipText("Action 1 tooltip"); - pinSelectionAction.setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/lock.png")); + pinSelectionAction.setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/lock.png")); //$NON-NLS-1$ //$NON-NLS-2$ - linkAllAction = new Action("Link All", Action.AS_RADIO_BUTTON) { + linkAllAction = new Action(Messages.SourceView_LinkAll, Action.AS_RADIO_BUTTON) { @Override public void run() { setAcceptedObject(AcceptedObject.ALL); @@ -407,7 +407,7 @@ public class SourceView extends ViewPart implements ISelectionListener, IPartLis } }; - linkDocumentsAction = new Action("Link Documents", Action.AS_RADIO_BUTTON) { + linkDocumentsAction = new Action(Messages.SourceView_LinkDocuments, Action.AS_RADIO_BUTTON) { @Override public void run() { setAcceptedObject(AcceptedObject.DOCUMENT);