第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

未調(diào)用標(biāo)簽提供程序

未調(diào)用標(biāo)簽提供程序

瀟湘沐 2022-06-23 19:30:45
以下代碼無法正確顯示文本和 long,而是 Record 類的 toString()。public class CodeCheckerPreferencePage extends PreferencePage   implements      IWorkbenchPreferencePage{   public CodeCheckerPreferencePage() {      super( "Code checker statistics" );   }   @Override   protected Control createContents( Composite parent ) {      final TableViewer viewer =         new TableViewer(            parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL |                    SWT.FULL_SELECTION | SWT.BORDER );      viewer.setContentProvider( ArrayContentProvider.getInstance());      viewer.setInput( Stats.getStats().getRecords());      final Table table = viewer.getTable();      table.setHeaderVisible( true );      table.setLinesVisible( true );      final TableViewerColumn colFile =         new TableViewerColumn( viewer, SWT.NONE );      colFile.getColumn().setWidth( 400 );      colFile.getColumn().setText( "File" );      colFile.setLabelProvider( new ColumnLabelProvider() {         @Override public String getText( Object element ) {            return ((Stats.Record)element).getFile(); }});      final TableViewerColumn colConsumed =         new TableViewerColumn( viewer, SWT.NONE );      colConsumed.getColumn().setWidth( 80 );      colConsumed.getColumn().setText( "Consumed ms" );      colConsumed.setLabelProvider( new ColumnLabelProvider() {         @Override public String getText( Object element ) {            return String.format( "%3d",                      ((Stats.Record)element).getConsumed()); }});      final GridData gridData = new GridData();      gridData.verticalAlignment = GridData.FILL;      gridData.horizontalSpan = 2;      gridData.grabExcessHorizontalSpace = true;      gridData.grabExcessVerticalSpace = true;      gridData.horizontalAlignment = GridData.FILL;      viewer.getControl().setLayoutData(gridData);      return table;   }   @Override   public void init(IWorkbench workbench) {/**/}}“文件”列中顯示的文本為“abcStats$Record@750e313c”,“已使用”列中不顯示任何文本。我在“getText”方法中設(shè)置了斷點(diǎn):它們永遠(yuǎn)不會到達(dá)。我的錯(cuò)誤在哪里?
查看完整描述

1 回答

?
慕森卡

TA貢獻(xiàn)1806條經(jīng)驗(yàn) 獲得超8個(gè)贊

你必須在打電話之前設(shè)置好桌子的一切,setInput所以移動(dòng)

  viewer.setInput( Stats.getStats().getRecords());

行到方法的末尾。


查看完整回答
反對 回復(fù) 2022-06-23
  • 1 回答
  • 0 關(guān)注
  • 83 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號