private void createDefaultLabel(Composite composite, int h_span) { final ICommandService commandSvc= (ICommandService) PlatformUI.getWorkbench().getAdapter(ICommandService.class); final Command command= commandSvc.getCommand(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); ParameterizedCommand pCmd= new ParameterizedCommand(command, null); String key= getKeyboardShortcut(pCmd); if (key == null) key= PreferencesMessages.CodeAssistAdvancedConfigurationBlock_no_shortcut; PixelConverter pixelConverter= new PixelConverter(composite); int width= pixelConverter.convertWidthInCharsToPixels(40); Label label= new Label(composite, SWT.NONE | SWT.WRAP); label.setText(Messages.format(PreferencesMessages.CodeAssistAdvancedConfigurationBlock_page_description, new Object[] { key })); GridData gd= new GridData(GridData.FILL, GridData.FILL, true, false, h_span, 1); gd.widthHint= width; label.setLayoutData(gd); createFiller(composite, h_span); label= new Label(composite, SWT.NONE | SWT.WRAP); label.setText(PreferencesMessages.CodeAssistAdvancedConfigurationBlock_default_table_description); gd= new GridData(GridData.FILL, GridData.FILL, true, false, h_span, 1); gd.widthHint= width; label.setLayoutData(gd); }
private void createDefaultLabel(Composite composite, int h_span) { final ICommandService commandSvc= PlatformUI.getWorkbench().getAdapter(ICommandService.class); final Command command= commandSvc.getCommand(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); ParameterizedCommand pCmd= new ParameterizedCommand(command, null); String key= getKeyboardShortcut(pCmd); if (key == null) key= PreferencesMessages.CodeAssistAdvancedConfigurationBlock_no_shortcut; PixelConverter pixelConverter= new PixelConverter(composite); int width= pixelConverter.convertWidthInCharsToPixels(40); Label label= new Label(composite, SWT.NONE | SWT.WRAP); label.setText(Messages.format(PreferencesMessages.CodeAssistAdvancedConfigurationBlock_page_description, new Object[] { key })); GridData gd= new GridData(GridData.FILL, GridData.FILL, true, false, h_span, 1); gd.widthHint= width; label.setLayoutData(gd); createFiller(composite, h_span); label= new Label(composite, SWT.NONE | SWT.WRAP); label.setText(PreferencesMessages.CodeAssistAdvancedConfigurationBlock_default_table_description); gd= new GridData(GridData.FILL, GridData.FILL, true, false, h_span, 1); gd.widthHint= width; label.setLayoutData(gd); }
private void createDefaultLabel(Composite composite, int h_span) { final ICommandService commandSvc= PlatformUI.getWorkbench().getAdapter(ICommandService.class); final Command command= commandSvc.getCommand(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); ParameterizedCommand pCmd= new ParameterizedCommand(command, null); String key= getKeyboardShortcut(pCmd); if (key == null) key= PreferencesMessages.CodeAssistAdvancedConfigurationBlock_no_shortcut; PixelConverter pixelConverter= new PixelConverter(composite); int width= pixelConverter.convertWidthInCharsToPixels(40); Label label= new Label(composite, SWT.NONE | SWT.WRAP); label.setText(Messages.format(PreferencesMessages.CodeAssistAdvancedConfigurationBlock_page_description, new Object[] { key })); GridData gd= new GridData(GridData.FILL, GridData.FILL, true, false, h_span, 1); gd.widthHint= width; label.setLayoutData(gd); createFiller(composite, h_span); label= new Label(composite, SWT.NONE | SWT.WRAP); label.setText(PreferencesMessages.CodeAssistAdvancedConfigurationBlock_default_table_description); gd= new GridData(GridData.FILL, GridData.FILL, true, false, h_span, 1); gd.widthHint= width; label.setLayoutData(gd); }