2012-07-13 3 views
0

사용자 정의 RCP 응용 프로그램이 있습니다. 설치 정보 버튼을 정보 대화 상자에서 숨기는 방법을 알고 있습니까 ??Eclipse RCP 정보 창에서 설치 정보 숨기기

The about window

+0

이 프로그래밍 관련되어 있습니까? –

+1

@JosephElcid 예입니다. 문제는 방금 "org.eclipse.ui.help.aboutAction"명령을 호출하여 대화 상자를 표시한다는 것입니다. 하지만 그것을 사용자 정의하고 해당 버튼을 삭제하는 방법을 모르겠습니다. – oracleruiz

답변

0

난 당신이 ... 설치 세부 사항 버튼이 AboutDialog createButtonsForButtonBar 방법에 생성됩니다 수 있다고 생각하지 않습니다 ... 그리고 그것은 무조건입니다 것 같습니다.

1

버튼을 숨기는 방법을 찾지 못했지만 AboutDialog를 확장하고 플러그인에 대한 새로운 명령을 내릴 수있는 유일한 방법이라고 생각합니다.

public class DAboutHandler extends AbstractHandler { 


private class DAboutDialog extends AboutDialog 
{ 
    public final static int DETAILS_ID = IDialogConstants.CLIENT_ID + 1; 
    public DAboutDialog(Shell parentShell) { 
     super(parentShell); 
    } 

    @Override 
    protected Button createButton(Composite parent, int id, String label, boolean defaultButton) { 
     if(id==DETAILS_ID) return null; 
     return super.createButton(parent, id, label, defaultButton); 
    } 
} 
/* 
* (non-Javadoc) 
* 
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) 
*/ 
public DAboutDialog execute(ExecutionEvent event) throws ExecutionException { 
    new DAboutDialog(HandlerUtil.getActiveShellChecked(event)).open(); 
    return null; 
} 

}

+0

'AboutDialog'을 확장하는 대신에'Dialog'를 확장하여 자신의 About 내용을 추가하는 방법도 있습니다. – Krease

+0

맞습니다.하지만이 버튼을 숨기려면이 방법이 최선이라고 생각합니다. ^^ – Kasas

관련 문제