Index: www/include/scripts/main.js
===================================================================
--- www/include/scripts/main.js	(revision 4934)
+++ www/include/scripts/main.js	(working copy)
@@ -456,7 +456,7 @@
 		this.controllers['PLUGINDEFINITION'] = { url:'admin/plugindefinitions/index.jsp', width:800, height:500 };
 		this.controllers['PLUGINTYPE'] = { url:'admin/plugintypes/index.jsp', width:700, height:400 };
 		this.controllers['JOBAGENT'] = { url:'admin/jobagents/index.jsp', width:700, height:400 };
-		this.controllers['PROTOCOL'] = { url:'admin/protocols/index.jsp', width:500, height:340 };
+		this.controllers['PROTOCOL'] = { url:'admin/protocols/index.jsp', width:800, height:500 };
 		this.controllers['PROTOCOLTYPE'] = { url:'admin/protocoltypes/index.jsp', width:500, height:340 };
 		this.controllers['QUOTA'] = { url:'admin/quota/index.jsp', width:600, height:440 };
 		this.controllers['QUOTATYPE'] = { url:'admin/quotatypes/index.jsp', width:500, height:340 };
Index: www/admin/protocols/edit_protocol.jsp
===================================================================
--- www/admin/protocols/edit_protocol.jsp	(revision 4934)
+++ www/admin/protocols/edit_protocol.jsp	(working copy)
@@ -121,7 +121,7 @@
 	%>
 
 	<base:page type="popup" title="<%=title%>">
-	<base:head scripts="tabcontrol.js,linkitems.js" styles="tabcontrol.css">
+	<base:head scripts="tabcontrol.js,annotations.js,linkitems.js" styles="tabcontrol.css">
 		<script language="JavaScript">
 		// Validate the "Protocol" tab
 		function validateProtocol()
@@ -147,12 +147,29 @@
 			var frm = document.forms['protocol'];
 			if (TabControl.validateActiveTab('settings'))
 			{
+				if (annotationsLoaded) 
+				{
+					Annotations.addModifiedAnnotationsToForm(frames.annotations, frm);
+				}
 				frm.addedAnnotationTypes.value = Link.getActionIds(1, 'A').join(',');
 				frm.removedAnnotationTypes.value = Link.getActionIds(-1, 'A').join(',');
 				frm.submit();
 			}
 		}
 		
+		var annotationsLoaded = false;
+		function switchTab(tabControlId, tabId)
+		{
+			if (TabControl.setActiveTab(tabControlId, tabId))
+			{
+				if (tabId == 'annotations' && !annotationsLoaded)
+				{
+					Annotations.loadAnnotateFrame(frames.annotations, '<%=ID%>', '<%=itemType.name()%>', <%=itemId%>);
+					annotationsLoaded = true;
+				}
+			}
+		}
+		
 		function browseOnClick()
 		{
 			var frm = document.forms['protocol'];
@@ -234,8 +251,8 @@
 		<input type="hidden" name="cmd" value="UpdateItem">
 
 		<h3 class="docked"><%=title%> <base:help tabcontrol="settings" /></h3>
-		<t:tabcontrol id="settings" contentstyle="<%="height: "+(int)(scale*220)+"px;"%>" 
-			position="bottom"  remember="<%=protocol != null%>">
+		<t:tabcontrol id="settings" contentstyle="<%="height: "+(int)(scale*370)+"px;"%>" 
+			position="bottom"  remember="<%=protocol != null%>" switch="switchTab">
 		<t:tab id="info" title="Protocol" validate="validateProtocol()" helpid="protocol.edit">
 			<table class="form" cellspacing=0>
 			<tr>
@@ -305,7 +322,7 @@
 		<t:tab id="parameters" title="Parameters" 
 			validate="validateParameters()" helpid="protocol.edit.parameters">
 		<table class="form" cellspacing=0>
-
+		
 		<tr valign="top">
 			<td><b>Annotation types</b>
 				<table border="0" cellspacing="0" cellpadding="0">
@@ -336,6 +353,14 @@
 		</tr>
 		</table>
 		</t:tab>
+		
+		<t:tab id="annotations" title="Annotations" 
+			helpid="annotations.edit" tooltip="Enter values for annotations">
+			<iframe name="annotations" id="idAnnotations" src="../../common/annotations/wait.jsp" 
+				width="100%"  height="<%=(int)(scale*370)%>" frameborder=0 vspace=0 hspace=0
+				marginwidth=0 marginheight=0 scrolling="auto" style="overflow: visible"></iframe>
+		</t:tab>
+		
 		</t:tabcontrol>
 
 		<table align="center">
Index: www/admin/protocols/index.jsp
===================================================================
--- www/admin/protocols/index.jsp	(revision 4934)
+++ www/admin/protocols/index.jsp	(working copy)
@@ -172,6 +172,9 @@
 			if (annotationTypeId != -1) protocol.addParameter(AnnotationType.getById(dc, annotationTypeId));
 		}
 		
+		// Annotations tab
+		Base.updateAnnotations(dc, protocol, protocol, request);
+		
 		dc.commit();
 		cc.removeObject("item");
 	}
Index: www/admin/protocols/view_protocol.jsp
===================================================================
--- www/admin/protocols/view_protocol.jsp	(revision 4934)
+++ www/admin/protocols/view_protocol.jsp	(working copy)
@@ -436,8 +436,20 @@
 			}
 			%>	
 		</div>
-			</t:tab>
-			</t:tabcontrol>
+		</t:tab>
+			
+		<t:tab id="annotations" title="Annotations" 
+			tooltip="View annotation values">
+			<div class="boxed">
+			<jsp:include page="../../common/annotations/list_annotations.jsp">
+				<jsp:param name="item_type" value="<%=itemType.name()%>" />
+				<jsp:param name="item_id" value="<%=itemId%>" />
+				<jsp:param name="ID" value="<%=ID%>" />
+			</jsp:include>
+			</div>
+		</t:tab>
+			
+		</t:tabcontrol>
 
 	</base:body>
 	</base:page>
Index: www/admin/protocols/list_protocol.jsp
===================================================================
--- www/admin/protocols/list_protocol.jsp	(revision 4934)
+++ www/admin/protocols/list_protocol.jsp	(working copy)
@@ -29,6 +29,9 @@
 	import="net.sf.basedb.core.Item"
 	import="net.sf.basedb.core.Protocol"
 	import="net.sf.basedb.core.ProtocolType"
+	import="net.sf.basedb.core.Annotation"
+	import="net.sf.basedb.core.AnnotationType"
+	import="net.sf.basedb.core.AnnotationSet"
 	import="net.sf.basedb.core.ItemQuery"
 	import="net.sf.basedb.core.Include"
 	import="net.sf.basedb.core.ItemResultIterator"
@@ -78,8 +81,12 @@
 final String title = mode.generateTitle("protocol", "protocols");
 final DbControl dc = sc.newDbControl();
 ItemResultIterator<Protocol> protocols = null;
+ItemResultList<AnnotationType> annotationTypes = null;
 try
 {
+	final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType);
+	annotationTypes = annotationTypeQuery.list(dc);
+	
 	Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc);
 	final ItemQuery<Protocol> query = Base.getConfiguredQuery(cc, true, Protocol.getQuery(), mode);
 
@@ -289,6 +296,38 @@
 				filterable="true" 
 				exportable="true"
 			/>
+			<%
+			for (AnnotationType at : annotationTypes)
+			{
+				Enumeration<String, String> annotationEnum = null;
+				Formatter formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType());
+				if (at.isEnumeration())
+				{
+					annotationEnum = new Enumeration<String, String>();
+					List<?> values = at.getValues();
+					for (Object value : values)
+					{
+						String encoded = formatter.format(value);
+						annotationEnum.add(encoded, encoded);
+					}
+				}
+				%>
+				<tbl:columndef 
+					id="<%="at"+at.getId()%>"
+					title="<%=HTML.encodeTags(at.getName())+" [A]"%>" 
+					property="<%="#"+at.getId()%>"
+					annotation="true"
+					datatype="<%=at.getValueType().getStringValue()%>"
+					enumeration="<%=annotationEnum%>"
+					sortable="false" 
+					filterable="true" 
+					exportable="true"
+					formatter="<%=formatter%>"
+					unit="<%=at.getDefaultUnit()%>"
+				/>
+				<%
+			}
+			%>	
 			<tbl:columndef
 				id="permission"
 				title="Permission"
@@ -485,6 +524,32 @@
 										enablePropertyLink="<%=mode.hasPropertyLink()%>"
 									/></tbl:cell>
 								<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell>
+								<%
+								AnnotationSet as = item.isAnnotated() ? item.getAnnotationSet() : null;
+								if (as != null)
+								{
+									for (AnnotationType at : annotationTypes)
+									{
+										if (as.hasAnnotation(at))
+										{
+											Annotation a = as.getAnnotation(at);
+											String suffix = a.getUnitSymbol(null);
+											if (suffix != null) suffix = "&nbsp;" + suffix;
+											%>
+											<tbl:cell 
+												column="<%="at"+at.getId()%>"
+												><tbl:cellvalue 
+													list="<%=a.getValues(null)%>"
+													suffix="<%=suffix%>"
+											/></tbl:cell>
+											<%
+										}
+									}
+								}
+								%>
+		
+								
+								
 								<tbl:cell column="permission"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell>
 								<tbl:cell column="sharedTo">
 									<%
Index: src/core/net/sf/basedb/core/Protocol.java
===================================================================
--- src/core/net/sf/basedb/core/Protocol.java	(revision 4934)
+++ src/core/net/sf/basedb/core/Protocol.java	(working copy)
@@ -37,7 +37,7 @@
 	@version 2.0
 */
 public class Protocol
-	extends CommonItem<ProtocolData>
+	extends AnnotatedItem<ProtocolData>
 	implements FileAttachable, Registered
 {
 	/**
@@ -433,4 +433,13 @@
 		);
 		return query;
 	}
+
+	/**
+	@return Always null
+	@since
+	 */
+	public Set<Annotatable> getAnnotatableParents()
+	{
+		return null;
+	}
 }
Index: src/core/net/sf/basedb/core/data/ProtocolData.java
===================================================================
--- src/core/net/sf/basedb/core/data/ProtocolData.java	(revision 4934)
+++ src/core/net/sf/basedb/core/data/ProtocolData.java	(working copy)
@@ -34,7 +34,7 @@
 	@hibernate.class table="`Protocols`" lazy="true"
 */
 public class ProtocolData
-	extends CommonData
+	extends AnnotatedData
 	implements FileAttachableData, RegisteredData
 {
 
