Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: bd8c978ec0868c52862b2f2f18a1f8ab178ed412 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/*******************************************************************************
 * Copyright (c) 2000, 2018 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

package org.eclipse.ui.activities;

import java.util.Set;
import org.eclipse.ui.internal.util.Util;

/**
 * An instance of this class describes changes to an instance of
 * <code>IActivityManager</code>.  This class does not give details as to the
 * specifics of a change, only that the given property on the source object has
 * changed.
 *
 * <p>
 * This class is not intended to be extended by clients.
 * </p>
 *
 * @since 3.0
 * @see IActivityManagerListener#activityManagerChanged(ActivityManagerEvent)
 */
public final class ActivityManagerEvent {
    private IActivityManager activityManager;

    private boolean definedActivityIdsChanged;

    private boolean definedCategoryIdsChanged;

    private boolean enabledActivityIdsChanged;

    /**
     * The set of activity identifiers (strings) that were defined before the
     * change occurred. If the defined activities did not changed, then this
     * value is <code>null</code>.
     */
	private final Set<String> previouslyDefinedActivityIds;

    /**
     * The set of category identifiers (strings) that were defined before the
     * change occurred. If the defined category did not changed, then this value
     * is <code>null</code>.
     */
	private final Set<String> previouslyDefinedCategoryIds;

    /**
     * The set of activity identifiers (strings) that were enabled before the
     * change occurred. If the enabled activities did not changed, then this
     * value is <code>null</code>.
     */
	private final Set<String> previouslyEnabledActivityIds;

    /**
     * Creates a new instance of this class.
     *
     * @param activityManager
     *            the instance of the interface that changed.
     * @param definedActivityIdsChanged
     *            <code>true</code>, iff the definedActivityIds property
     *            changed.
     * @param definedCategoryIdsChanged
     *            <code>true</code>, iff the definedCategoryIds property
     *            changed.
     * @param enabledActivityIdsChanged
     *            <code>true</code>, iff the enabledActivityIds property
     *            changed.
     * @param previouslyDefinedActivityIds
     *            the set of identifiers to previously defined activities. This
     *            set may be empty. If this set is not empty, it must only
     *            contain instances of <code>String</code>. This set must be
     *            <code>null</code> if definedActivityIdsChanged is
     *            <code>false</code> and must not be null if
     *            definedActivityIdsChanged is <code>true</code>.
     * @param previouslyDefinedCategoryIds
     *            the set of identifiers to previously defined category. This
     *            set may be empty. If this set is not empty, it must only
     *            contain instances of <code>String</code>. This set must be
     *            <code>null</code> if definedCategoryIdsChanged is
     *            <code>false</code> and must not be null if
     *            definedCategoryIdsChanged is <code>true</code>.
     * @param previouslyEnabledActivityIds
     *            the set of identifiers to previously enabled activities. This
     *            set may be empty. If this set is not empty, it must only
     *            contain instances of <code>String</code>. This set must be
     *            <code>null</code> if enabledActivityIdsChanged is
     *            <code>false</code> and must not be null if
     *            enabledActivityIdsChanged is <code>true</code>.
     */
    public ActivityManagerEvent(IActivityManager activityManager,
            boolean definedActivityIdsChanged,
            boolean definedCategoryIdsChanged,
            boolean enabledActivityIdsChanged,
			final Set<String> previouslyDefinedActivityIds, final Set<String> previouslyDefinedCategoryIds,
			final Set<String> previouslyEnabledActivityIds) {
        if (activityManager == null) {
			throw new NullPointerException();
		}

        if (!definedActivityIdsChanged && previouslyDefinedActivityIds != null) {
			throw new IllegalArgumentException();
		}

        if (!definedCategoryIdsChanged && previouslyDefinedCategoryIds != null) {
			throw new IllegalArgumentException();
		}

        if (!enabledActivityIdsChanged && previouslyEnabledActivityIds != null) {
			throw new IllegalArgumentException();
		}

        if (definedActivityIdsChanged) {
            this.previouslyDefinedActivityIds = Util.safeCopy(
                    previouslyDefinedActivityIds, String.class);
        } else {
            this.previouslyDefinedActivityIds = null;
        }

        if (definedCategoryIdsChanged) {
            this.previouslyDefinedCategoryIds = Util.safeCopy(
                    previouslyDefinedCategoryIds, String.class);
        } else {
            this.previouslyDefinedCategoryIds = null;
        }

        if (enabledActivityIdsChanged) {
            this.previouslyEnabledActivityIds = Util.safeCopy(
                    previouslyEnabledActivityIds, String.class);
        } else {
            this.previouslyEnabledActivityIds = null;
        }

        this.activityManager = activityManager;
        this.definedActivityIdsChanged = definedActivityIdsChanged;
        this.definedCategoryIdsChanged = definedCategoryIdsChanged;
        this.enabledActivityIdsChanged = enabledActivityIdsChanged;
    }

    /**
     * Returns the instance of the interface that changed.
     *
     * @return the instance of the interface that changed. Guaranteed not to be
     *         <code>null</code>.
     */
    public IActivityManager getActivityManager() {
        return activityManager;
    }

    /**
     * Returns the activity identifiers that were previously defined.
     *
     * @return The set of defined activity identifiers before the changed; may
     *         be empty, but never <code>null</code>. This set will only
     *         contain strings.
     */
	public Set<String> getPreviouslyDefinedActivityIds() {
        return previouslyDefinedActivityIds;
    }

    /**
     * Returns the category identifiers that were previously defined.
     *
     * @return The set of defined category identifiers before the changed; may
     *         be empty, but never <code>null</code>. This set will only
     *         contain strings.
     */
	public Set<String> getPreviouslyDefinedCategoryIds() {
        return previouslyDefinedCategoryIds;
    }

    /**
     * Returns the activity identifiers that were previously enabled.
     *
     * @return The set of enabled activity identifiers before the changed; may
     *         be empty, but never <code>null</code>. This set will only
     *         contain strings.
     */
	public Set<String> getPreviouslyEnabledActivityIds() {
        return previouslyEnabledActivityIds;
    }

    /**
     * Returns whether or not the definedActivityIds property changed.
     *
     * @return <code>true</code>, iff the definedActivityIds property changed.
     */
    public boolean haveDefinedActivityIdsChanged() {
        return definedActivityIdsChanged;
    }

    /**
     * Returns whether or not the definedCategoryIds property changed.
     *
     * @return <code>true</code>, iff the definedCategoryIds property changed.
     */
    public boolean haveDefinedCategoryIdsChanged() {
        return definedCategoryIdsChanged;
    }

    /**
     * Returns whether or not the enabledActivityIds property changed.
     *
     * @return <code>true</code>, iff the enabledActivityIds property changed.
     */
    public boolean haveEnabledActivityIdsChanged() {
        return enabledActivityIdsChanged;
    }
}

Back to the top

f/features/org.eclipse.jem-feature/org.eclipse.jem.sdk/build.properties?h=v20041208'>features/org.eclipse.jem-feature/org.eclipse.jem.sdk/build.properties17
-rw-r--r--features/org.eclipse.jem-feature/org.eclipse.jem.sdk/eclipse32.gifbin1750 -> 0 bytes-rw-r--r--features/org.eclipse.jem-feature/org.eclipse.jem.sdk/plugin.properties18
-rw-r--r--features/org.eclipse.jem-feature/org.eclipse.jem.sdk/plugin.xml11
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplateFeature/build.properties7
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplateFeature/cpl-v10.html125
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplateFeature/eclipse_update_120.jpgbin14641 -> 0 bytes-rw-r--r--features/org.eclipse.jem-feature/sourceTemplateFeature/feature.properties129
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplateFeature/license.html71
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplatePlugin/about.html36
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplatePlugin/about.ini29
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplatePlugin/about.properties28
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplatePlugin/build.properties9
-rw-r--r--features/org.eclipse.jem-feature/sourceTemplatePlugin/eclipse32.gif