001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.modules.uml.core.metamodel.structure;
043:
044: import org.netbeans.modules.uml.core.eventframework.IEventDispatcher;
045: import org.netbeans.modules.uml.core.eventframework.IEventPayload;
046: import org.netbeans.modules.uml.core.workspacemanagement.IWorkspace;
047:
048: public interface IStructureEventDispatcher extends IEventDispatcher {
049: /**
050: * Registers an event sink to handle IProjectEventsSink events.
051: */
052: public void registerForProjectEvents(IProjectEventsSink handler);
053:
054: /**
055: * Removes a sink listening for IProjectEventsSink events.
056: */
057: public void revokeProjectSink(IProjectEventsSink handler);
058:
059: /**
060: * Registers an event sink to handle IArtifactEventsSink events.
061: */
062: public void registerForArtifactEvents(IArtifactEventsSink handler);
063:
064: /**
065: * Removes a sink listening for IArtifactEventsSink events.
066: */
067: public void revokeArtifactSink(IArtifactEventsSink handler);
068:
069: /**
070: * Fired whenever the passed in Project's Mode property is about to change.
071: */
072: public boolean firePreModeModified(IProject pProject,
073: String newValue, IEventPayload payLoad);
074:
075: /**
076: * Fired whenever the passed in Project's Mode has been changed.
077: */
078: public void fireModeModified(IProject pProject,
079: IEventPayload payLoad);
080:
081: /**
082: * Fired whenever the passed in Project's DefaultLanguage property is about to change.
083: */
084: public boolean firePreDefaultLanguageModified(IProject pProject,
085: String newValue, IEventPayload payLoad);
086:
087: /**
088: * Fired whenever the passed in Project's DefaultLanguage property has been changed.
089: */
090: public void fireDefaultLanguageModified(IProject pProject,
091: IEventPayload payLoad);
092:
093: /**
094: * Fired right before a Project is created.
095: */
096: public boolean fireProjectPreCreate(IWorkspace space,
097: IEventPayload payLoad);
098:
099: /**
100: * Fired after a Project is created.
101: */
102: public void fireProjectCreated(IProject Project,
103: IEventPayload payLoad);
104:
105: /**
106: * Fired right before a Project is opened.
107: */
108: public boolean fireProjectPreOpen(IWorkspace space,
109: String fileName, IEventPayload payLoad);
110:
111: /**
112: * Fired after a Project is opened.
113: */
114: public void fireProjectOpened(IProject Project,
115: IEventPayload payLoad);
116:
117: /**
118: * Fired right before a Project is renamed.
119: */
120: public boolean fireProjectPreRename(IProject Project,
121: String newName, IEventPayload payLoad);
122:
123: /**
124: * Fired after a Project is renamed.
125: */
126: public void fireProjectRenamed(IProject Project, String oldName,
127: IEventPayload payLoad);
128:
129: /**
130: * Fired right before a Project is closed.
131: */
132: public boolean fireProjectPreClose(IProject Project,
133: IEventPayload payLoad);
134:
135: /**
136: * Fired after a Project has been closed.
137: */
138: public void fireProjectClosed(IProject Project,
139: IEventPayload payLoad);
140:
141: /**
142: * Fired right before a Project is saved.
143: */
144: public boolean fireProjectPreSave(IProject Project,
145: IEventPayload payLoad);
146:
147: /**
148: * Fired after a Project is saved.
149: */
150: public void fireProjectSaved(IProject Project, IEventPayload payLoad);
151:
152: /**
153: * Fired right before an Artifact's file name is modified.
154: */
155: public boolean fireArtifactFileNamePreModified(IArtifact Artifact,
156: String newName, IEventPayload payLoad);
157:
158: /**
159: * Fired after an Artifact's file name is modified.
160: */
161: public void fireArtifactFileNameModified(IArtifact Artifact,
162: String oldName, IEventPayload payLoad);
163:
164: /**
165: * Fired whenever the passed in Artifact's contents are about to become dirty.
166: */
167: public boolean fireArtifactPreDirty(IArtifact pArtifact,
168: IEventPayload payLoad);
169:
170: /**
171: * Fired whenever the passed in Artifact's contents are dirty.
172: */
173: public void fireArtifactDirty(IArtifact pArtifact,
174: IEventPayload payLoad);
175:
176: /**
177: * Fired whenever the passed in Artifact is about to be saved.
178: */
179: public boolean fireArtifactPreSave(IArtifact pArtifact,
180: String fileName, IEventPayload payLoad);
181:
182: /**
183: * Fired whenever the passed in Artifact has been saved.
184: */
185: public void fireArtifactSave(IArtifact pArtifact, String fileName,
186: IEventPayload payLoad);
187:
188: /**
189: * Fired right before a referenced library location is added to the Project.
190: */
191: public boolean firePreReferencedLibraryAdded(IProject Project,
192: String refLibLoc, IEventPayload payLoad);
193:
194: /**
195: * Fired right after a referenced library locatiFire is added to the Project.
196: */
197: public void fireReferencedLibraryAdded(IProject Project,
198: String refLibLoc, IEventPayload payLoad);
199:
200: /**
201: * Fired right before a referenced library locatiFire is removed from the Project.
202: */
203: public boolean firePreReferencedLibraryRemoved(IProject Project,
204: String refLibLoc, IEventPayload payLoad);
205:
206: /**
207: * Fired right after a referenced library locatiFire is removed from the Project.
208: */
209: public void fireReferencedLibraryRemoved(IProject Project,
210: String refLibLoc, IEventPayload payLoad);
211:
212: }
|