Search in sources :

Example 1 with PropertyPageContributorManager

use of org.eclipse.ui.internal.dialogs.PropertyPageContributorManager in project eclipse.platform.ui by eclipse-platform.

the class PropertyPageTests method testPropertyPageContribution.

@Test
public void testPropertyPageContribution() {
    PropertyPageContributorManager cManager = PropertyPageContributorManager.getManager();
    PropertyPageManager manager;
    DynamicTestType type = new DynamicTestType();
    cManager.contribute(manager = new PropertyPageManager(), type);
    assertNull(manager.find(PROPERTYPAGE));
    getBundle();
    cManager.contribute(manager = new PropertyPageManager(), type);
    IPreferenceNode result = manager.find(PROPERTYPAGE);
    assertNotNull(result);
    // muck around and ensure we've created some potential garbage
    result.createPage();
    result.disposeResources();
    removeBundle();
    cManager.contribute(manager = new PropertyPageManager(), type);
    assertNull(manager.find(PROPERTYPAGE));
}
Also used : PropertyPageContributorManager(org.eclipse.ui.internal.dialogs.PropertyPageContributorManager) PropertyPageManager(org.eclipse.ui.internal.dialogs.PropertyPageManager) IPreferenceNode(org.eclipse.jface.preference.IPreferenceNode) Test(org.junit.Test)

Example 2 with PropertyPageContributorManager

use of org.eclipse.ui.internal.dialogs.PropertyPageContributorManager in project eclipse.platform.ui by eclipse-platform.

the class PropertyPageTests method testPropertyPageCount.

@Test
public void testPropertyPageCount() {
    PropertyPageContributorManager manager = PropertyPageContributorManager.getManager();
    int size = manager.getContributors().size();
    getBundle();
    assertEquals(size + 1, manager.getContributors().size());
    removeBundle();
    assertEquals(size, manager.getContributors().size());
}
Also used : PropertyPageContributorManager(org.eclipse.ui.internal.dialogs.PropertyPageContributorManager) Test(org.junit.Test)

Aggregations

PropertyPageContributorManager (org.eclipse.ui.internal.dialogs.PropertyPageContributorManager)2 Test (org.junit.Test)2 IPreferenceNode (org.eclipse.jface.preference.IPreferenceNode)1 PropertyPageManager (org.eclipse.ui.internal.dialogs.PropertyPageManager)1