]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - server/plugins/org.argeo.jcr.ui.explorer/src/main/java/org/argeo/jcr/ui/explorer/editors/NodeVersionHistoryPage.java
Update license headers
[lgpl/argeo-commons.git] / server / plugins / org.argeo.jcr.ui.explorer / src / main / java / org / argeo / jcr / ui / explorer / editors / NodeVersionHistoryPage.java
index bd8265ce9d40b71d79e559fa21ef3dffb878aeb5..8b5968fd8348046f3f98dba4d276a8ebfc6e424c 100644 (file)
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.argeo.jcr.ui.explorer.editors;
 
 import java.text.DateFormat;
@@ -18,8 +33,6 @@ import javax.jcr.version.VersionHistory;
 import javax.jcr.version.VersionIterator;
 import javax.jcr.version.VersionManager;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.argeo.ArgeoException;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.jcr.PropertyDiff;
@@ -53,8 +66,8 @@ import org.eclipse.ui.forms.widgets.TableWrapLayout;
  * */
 public class NodeVersionHistoryPage extends FormPage implements
                JcrExplorerConstants {
-       private final static Log log = LogFactory
-                       .getLog(NodeVersionHistoryPage.class);
+       // private final static Log log = LogFactory
+       // .getLog(NodeVersionHistoryPage.class);
 
        // Utils
        protected DateFormat timeFormatter = new SimpleDateFormat(DATE_TIME_FORMAT);
@@ -75,6 +88,8 @@ public class NodeVersionHistoryPage extends FormPage implements
 
        protected void createFormContent(IManagedForm managedForm) {
                ScrolledForm form = managedForm.getForm();
+               form.setText(JcrExplorerPlugin
+                               .getMessage("nodeVersionHistoryPageTitle"));
                tk = managedForm.getToolkit();
                GridLayout twt = new GridLayout(1, false);
                twt.marginWidth = twt.marginHeight = 5;
@@ -189,9 +204,9 @@ public class NodeVersionHistoryPage extends FormPage implements
 
                                StringBuffer buf = new StringBuffer("");
                                Map<String, PropertyDiff> diffs = lst.get(i).getDiffs();
-                               props: for (String prop : diffs.keySet()) {
+                               for (String prop : diffs.keySet()) {
                                        PropertyDiff pd = diffs.get(prop);
-                                       String propName = pd.getRelPath();
+                                       // String propName = pd.getRelPath();
                                        Value refValue = pd.getReferenceValue();
                                        Value newValue = pd.getNewValue();
                                        String refValueStr = "";
@@ -282,7 +297,7 @@ public class NodeVersionHistoryPage extends FormPage implements
                                                                                Property.JCR_CREATED).getDate();
 
                                                } catch (Exception e) {
-                                                       // Silent that info is optionnal
+                                                       // Silent that info is optional
                                                }
                                                VersionDiff vd = new VersionDiff(lastUserName,
                                                                lastUpdate, diffs);