Tuesday, 16 August 2016

[RCP] How to remove unnecessary unnecessarypreference pages (불필요 Preference Page 제거)



If you want to remove unnecessary preference pages(Maven and Mylyn),

add commands in postWindowOpen() method which is in ApplicationWorkbenchWindowAdvisor class.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
    @Override
    public void postWindowOpen() {
     ...
     
     PreferenceManager pm = PlatformUI.getWorkbench().getPreferenceManager();
     // For checking preference nodes id
//     org.eclipse.jface.preference.IPreferenceNode[] nodes = pm.getRootSubNodes();
//     for ( int ll = 0; ll < nodes.length; ll++) {
//      System.out.println( nodes[ ll].getId());
//     }
     pm.remove( "org.eclipse.m2e.core.preferences.Maven2PreferencePage");
     pm.remove( "org.eclipse.mylyn.preferencePages.Mylyn");
     
     
 }

No comments:

Post a Comment