Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 403872
Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/activities/IWorkbenchActivitySupport.java (-3 / +17 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2008 IBM Corporation and others.
2
 * Copyright (c) 2003, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 36-42 Link Here
36
    IActivityManager getActivityManager();
36
    IActivityManager getActivityManager();
37
37
38
    /**
38
    /**
39
     * Sets the set of identifiers to enabled activities.
39
     * Sets the set of identifiers to enabled activities and saves
40
     * the workbench plug-in preferences.
40
     * 
41
     * 
41
     * @param enabledActivityIds
42
     * @param enabledActivityIds
42
     *            the set of identifiers to enabled activities. This set may be
43
     *            the set of identifiers to enabled activities. This set may be
Lines 44-50 Link Here
44
     *            is not empty, it must only contain instances of <code>String</code>.
45
     *            is not empty, it must only contain instances of <code>String</code>.
45
     */
46
     */
46
    void setEnabledActivityIds(Set enabledActivityIds);
47
    void setEnabledActivityIds(Set enabledActivityIds);
47
    
48
49
    /**
50
     * Sets the set of identifiers to enabled activities.
51
     * 
52
     * @param enabledActivityIds
53
     *            the set of identifiers to enabled activities. This set may be
54
     *            empty, but it must not be <code>null</code>. If this set
55
     *            is not empty, it must only contain instances of <code>String</code>.
56
     * @param savePluginPreferences
57
     *            <code>true</code> if the workbench plug-in preferences should be saved, <code>false</code> otherwise
58
     * @since N/A - not part of any official build
59
     */
60
    void setEnabledActivityIds(Set enabledActivityIds, boolean savePluginPreferences);
61
48
    /**
62
    /**
49
     * Return the image associated with this activity.
63
     * Return the image associated with this activity.
50
     * 
64
     * 
(-)Eclipse UI/org/eclipse/ui/internal/ActivityPersistanceHelper.java (-2 / +1 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2008 IBM Corporation and others.
2
 * Copyright (c) 2003, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 282-288 Link Here
282
	            store.setValue(createPreferenceKey(activity.getId()), activity
282
	            store.setValue(createPreferenceKey(activity.getId()), activity
283
	                    .isEnabled());
283
	                    .isEnabled());
284
	        }
284
	        }
285
	        WorkbenchPlugin.getDefault().savePluginPreferences();
286
        }
285
        }
287
        finally {
286
        finally {
288
            saving = false;
287
            saving = false;
(-)Eclipse UI/org/eclipse/ui/internal/activities/ws/WorkbenchActivitySupport.java (-2 / +12 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2008 IBM Corporation and others.
2
 * Copyright (c) 2003, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 317-323 Link Here
317
     * @see org.eclipse.ui.activities.IWorkbenchActivitySupport#setEnabledActivityIds(java.util.Set)
317
     * @see org.eclipse.ui.activities.IWorkbenchActivitySupport#setEnabledActivityIds(java.util.Set)
318
     */
318
     */
319
    public void setEnabledActivityIds(Set enabledActivityIds) {
319
    public void setEnabledActivityIds(Set enabledActivityIds) {
320
        mutableActivityManager.setEnabledActivityIds(enabledActivityIds);
320
        setEnabledActivityIds(enabledActivityIds, true);
321
    }
322
323
    /* (non-Javadoc)
324
     * @see org.eclipse.ui.activities.IWorkbenchActivitySupport#setEnabledActivityIds(java.util.Set, boolean)
325
     */
326
    public void setEnabledActivityIds(Set enabledActivityIds, boolean savePluginPreferences) {
327
    	mutableActivityManager.setEnabledActivityIds(enabledActivityIds);
328
    	if (savePluginPreferences) {
329
    		WorkbenchPlugin.getDefault().savePluginPreferences();
330
    	}
321
    }
331
    }
322
332
323
	/* (non-Javadoc)
333
	/* (non-Javadoc)

Return to bug 403872