/**
* 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;
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);
}
});
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) {
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);
}
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
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);
}
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);
}
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);
}
};
- 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);