gvsig.patch
| src/com/iver/cit/gvsig/project/documents/layout/fframes/FFrameOverView.java (working copy) | ||
|---|---|---|
| 179 | 179 |
return PluginServices.getText(this, "Localizador") + num; |
| 180 | 180 |
} |
| 181 | 181 |
public IFFrame cloneFFrame(Layout layout) {
|
| 182 |
FFrameOverView frame = new FFrameOverView(); |
|
| 182 |
FFrameOverView frame = (FFrameOverView) FrameFactory |
|
| 183 |
.createFrameFromName(FFrameOverViewFactory.registerName); |
|
| 183 | 184 |
frame.setLevel(this.getLevel()); |
| 184 | 185 |
frame.setNum(this.num); |
| 185 | 186 |
frame.setName(this.getName()); |
| src/com/iver/cit/gvsig/LoadEvent.java (revision 0) | ||
|---|---|---|
| 1 |
package com.iver.cit.gvsig; |
|
| 2 | ||
| 3 |
import com.iver.cit.gvsig.project.Project; |
|
| 4 | ||
| 5 |
/** |
|
| 6 |
* @author fergonco |
|
| 7 |
*/ |
|
| 8 |
public class LoadEvent {
|
|
| 9 | ||
| 10 |
private Project project; |
|
| 11 | ||
| 12 |
public LoadEvent(Project proj) {
|
|
| 13 |
this.project = proj; |
|
| 14 |
} |
|
| 15 | ||
| 16 |
public Project getProject() {
|
|
| 17 |
return project; |
|
| 18 |
} |
|
| 19 | ||
| 20 |
} |
|
| src/com/iver/cit/gvsig/LoadListener.java (revision 0) | ||
|---|---|---|
| 1 |
package com.iver.cit.gvsig; |
|
| 2 | ||
| 3 |
/** |
|
| 4 |
* @author fergonco |
|
| 5 |
*/ |
|
| 6 |
public interface LoadListener {
|
|
| 7 | ||
| 8 |
/** |
|
| 9 |
* Invoked after a project has been loaded. The loaded project can be |
|
| 10 |
* accessed through {@link LoadEvent#getProject()}
|
|
| 11 |
* |
|
| 12 |
* @param e |
|
| 13 |
*/ |
|
| 14 |
void afterLoading(LoadEvent e); |
|
| 15 | ||
| 16 |
} |
|
| src/com/iver/cit/gvsig/ProjectExtension.java (working copy) | ||
|---|---|---|
| 70 | 70 |
import org.gvsig.tools.file.PathGenerator; |
| 71 | 71 | |
| 72 | 72 |
import com.iver.andami.Launcher; |
| 73 |
import com.iver.andami.PluginServices; |
|
| 74 | 73 |
import com.iver.andami.Launcher.TerminationProcess; |
| 74 |
import com.iver.andami.PluginServices; |
|
| 75 | 75 |
import com.iver.andami.messages.NotificationManager; |
| 76 | 76 |
import com.iver.andami.plugins.Extension; |
| 77 | 77 |
import com.iver.andami.plugins.IExtension; |
| ... | ... | |
| 137 | 137 |
public static String PROJECTENCODING = "UTF-8"; |
| 138 | 138 | |
| 139 | 139 |
/** |
| 140 |
* <p>Identifier of the extension point used by <code>ProjectExtension</code> to manage {@link LoadListener}s.</p>
|
|
| 141 |
*/ |
|
| 142 |
public static final String AFTER_LOADING_ID = "After_Loading_PrjExt"; |
|
| 143 | ||
| 144 |
/** |
|
| 140 | 145 |
* <p>Identifier of the extension point used by <code>ProjectExtension</code> to manage {@link BeforeSavingListener BeforeSavingListener}s.</p>
|
| 141 | 146 |
*/ |
| 142 | 147 |
public static final String BEFORE_SAVING_ID = "Before_Saving_PrjExt"; |
| ... | ... | |
| 676 | 681 |
}else{
|
| 677 | 682 |
proj = Project.createFromXML03(new XMLEntity(tag)); |
| 678 | 683 |
} |
| 684 |
fireAfterLoadingEvent(new LoadEvent(proj)); |
|
| 679 | 685 |
if (!VERSION.equals(Version.format())){
|
| 680 | 686 |
NotificationManager.showMessageInfo(PluginServices.getText(this, "this_project_is_a_previous_version"),null); |
| 681 | 687 |
} |
| ... | ... | |
| 858 | 864 |
return false; |
| 859 | 865 |
} |
| 860 | 866 | |
| 867 |
public void addLoadListener(LoadListener listener) {
|
|
| 868 |
if (listener == null) {
|
|
| 869 |
return; |
|
| 870 |
} |
|
| 871 | ||
| 872 |
ExtensionPoints ePs = ((ExtensionPoints) ExtensionPointsSingleton |
|
| 873 |
.getInstance()); |
|
| 874 | ||
| 875 |
if (ePs.get(AFTER_LOADING_ID) == null) {
|
|
| 876 |
ArrayList aL = new ArrayList(); |
|
| 877 |
aL.add(listener); |
|
| 878 | ||
| 879 |
ePs.add(AFTER_LOADING_ID, "", aL); |
|
| 880 |
return; |
|
| 881 |
} |
|
| 882 | ||
| 883 |
((ArrayList) ((ExtensionPoint) ePs.get(AFTER_LOADING_ID)).get(""))
|
|
| 884 |
.add(listener); |
|
| 885 |
} |
|
| 886 | ||
| 861 | 887 |
/** |
| 862 | 888 |
* Adds the specified before saving listener to receive "before saving file events" from |
| 863 | 889 |
* this component. |
| ... | ... | |
| 1020 | 1046 |
} |
| 1021 | 1047 |
} |
| 1022 | 1048 | |
| 1049 |
private void fireAfterLoadingEvent(LoadEvent e) {
|
|
| 1050 |
ExtensionPoint eP = (ExtensionPoint) ((ExtensionPoints) ExtensionPointsSingleton |
|
| 1051 |
.getInstance()).get(AFTER_LOADING_ID); |
|
| 1052 | ||
| 1053 |
if (eP != null) {
|
|
| 1054 |
ArrayList listeners = ((ArrayList) eP.get(""));
|
|
| 1055 | ||
| 1056 |
for (int i = 0; i < listeners.size(); i++) |
|
| 1057 |
((LoadListener) listeners.get(i)).afterLoading(e); |
|
| 1058 |
} |
|
| 1059 |
} |
|
| 1060 | ||
| 1023 | 1061 |
/** |
| 1024 | 1062 |
* Reports a before saving file event. |
| 1025 | 1063 |
* |
| package.info (working copy) | ||
|---|---|---|
| 1 |
#Tue, 13 Dec 2011 10:38:13 +0100 |
|
| 1 | 2 |
#Fri Apr 01 13:07:07 CEST 2011 |
| 2 | 3 |
state=final |
| 3 | 4 |
name=appgvSIG |
| 4 |
buildNumber=1305
|
|
| 5 |
buildNumber=1304
|
|
| 5 | 6 |
official=true |
| 6 | 7 |
code=org.gvsig.app |
| 7 | 8 |
operating-system=all |
| ... | ... | |
| 11 | 12 |
version=1.11.0 |
| 12 | 13 |
type=plugin |
| 13 | 14 |
description=gvSIG basic extensions |
| 14 |
build=1305
|
|
| 15 |
build=1304
|
|
| 15 | 16 |
model-version=1.0.0 |