1.1 --- a/uml.project/src/org/netbeans/modules/uml/project/UMLProjectDataObject.java Thu Sep 09 13:32:36 2010 -0500
1.2 +++ b/uml.project/src/org/netbeans/modules/uml/project/UMLProjectDataObject.java Thu Sep 23 09:36:18 2010 -0500
1.3 @@ -93,6 +93,7 @@
1.4
1.5 CookieSet.Factory factory = new CookieSet.Factory()
1.6 {
1.7 + @Override
1.8 public Node.Cookie createCookie(Class klass)
1.9 {
1.10 if (klass.isAssignableFrom(EditorCookie.class)
1.11 @@ -136,7 +137,7 @@
1.12 getCookieSet().add(new Save());
1.13 }
1.14
1.15 - private final void removeSaveCookie(SaveCookie save)
1.16 + private void removeSaveCookie(SaveCookie save)
1.17 {
1.18 getCookieSet().remove(save);
1.19 }
1.20 @@ -160,6 +161,7 @@
1.21 return getName();
1.22 }
1.23
1.24 + @Override
1.25 protected Node createNodeDelegate()
1.26 {
1.27 DataNode node = null;
1.28 @@ -183,6 +185,7 @@
1.29 }
1.30
1.31
1.32 + @Override
1.33 public boolean isMoveAllowed()
1.34 {
1.35 return false;
1.36 @@ -191,6 +194,7 @@
1.37 /* Getter for rename action.
1.38 * @return true if the object can be renamed
1.39 */
1.40 + @Override
1.41 public boolean isRenameAllowed()
1.42 {
1.43 return false;
1.44 @@ -216,6 +220,7 @@
1.45 super(obj);
1.46 }
1.47
1.48 + @Override
1.49 protected FileObject getFile()
1.50 {
1.51 return getDataObject().getPrimaryFile();
1.52 @@ -224,11 +229,13 @@
1.53 /* make uml project data file read only in editor to prevent users
1.54 * from tampering it accidentally
1.55 */
1.56 + @Override
1.57 protected FileLock takeLock() throws IOException
1.58 {
1.59 throw new IOException("Read Only"); // I18N
1.60 }
1.61
1.62 + @Override
1.63 public CloneableOpenSupport findCloneableOpenSupport()
1.64 {
1.65 return (CloneableOpenSupport) getDataObject().getCookie(EditorCookie.class);
1.66 @@ -239,6 +246,7 @@
1.67
1.68 private class Save implements SaveCookie
1.69 {
1.70 + @Override
1.71 public void save() throws IOException
1.72 {
1.73 //custom logic to save uml project files
1.74 @@ -262,6 +270,11 @@
1.75 }
1.76 }
1.77 }
1.78 +
1.79 + @Override
1.80 + public Lookup getLookup() {
1.81 + return getCookieSet().getLookup();
1.82 + }
1.83
1.84 // ~~~~~~~~~~~~~~~~~~~~~~~~~~ private Loader ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1.85
1.86 @@ -277,6 +290,7 @@
1.87 super("org.netbeans.modules.uml.project.UMLProjectDataObject"); // NOI18N
1.88 }
1.89
1.90 + @Override
1.91 protected String actionsContext()
1.92 {
1.93 return "Loaders/text/xml/Actions"; // NOI18N
1.94 @@ -285,6 +299,7 @@
1.95 /** Get the default display name of this loader.
1.96 * @return default display name
1.97 */
1.98 + @Override
1.99 protected String defaultDisplayName()
1.100 {
1.101 return NbBundle.getMessage(UMLProjectDataObject.class, "PROP_UMLProjectDataLoader_Name");
1.102 @@ -296,6 +311,7 @@
1.103 * @return the primary file for the file or null if the file is not
1.104 * recognized by this loader
1.105 */
1.106 + @Override
1.107 protected FileObject findPrimaryFile(FileObject fo)
1.108 {
1.109 String ext = fo.getExt();
1.110 @@ -315,6 +331,7 @@
1.111 * @return the data object for this file
1.112 * @exception DataObjectExistsException if the primary file already has data object
1.113 */
1.114 + @Override
1.115 protected MultiDataObject createMultiObject(FileObject primaryFile)
1.116 throws DataObjectExistsException
1.117 {
1.118 @@ -326,6 +343,7 @@
1.119 * @param primaryFile primary file recognized by this loader
1.120 * @return primary entry for that file
1.121 */
1.122 + @Override
1.123 protected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, FileObject primaryFile)
1.124 {
1.125 return new FileEntry(obj, primaryFile);
1.126 @@ -337,6 +355,7 @@
1.127 * @param secondaryFile secondary file for which we want to create entry
1.128 * @return the entry
1.129 */
1.130 + @Override
1.131 protected MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, FileObject secondaryFile)
1.132 {
1.133 // uml project defines two project files, *.etd as the primary (data file) and *.ettm as the