From: <ju...@us...> - 2007-05-16 15:57:55
|
Revision: 4140 http://svn.sourceforge.net/smartfrog/?rev=4140&view=rev Author: julgui Date: 2007-05-16 08:57:53 -0700 (Wed, 16 May 2007) Log Message: ----------- SFOS-130 Management Console: Added support for editing attribute tags Modified Paths: -------------- trunk/core/smartfrog/src/org/smartfrog/services/management/DeployMgnt.java trunk/core/smartfrog/src/org/smartfrog/services/management/NewAttributeDialog.java trunk/core/smartfrog/src/org/smartfrog/services/management/PopUpTable.java trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/csf/DefaultParser.jj trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/csf/SFParser.java trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/DefaultParser.jj trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/SFParser.java trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/Parser.java trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/SFParser.java trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/StreamLanguageParser.java trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/StreamParser.java Modified: trunk/core/smartfrog/src/org/smartfrog/services/management/DeployMgnt.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/services/management/DeployMgnt.java 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/services/management/DeployMgnt.java 2007-05-16 15:57:53 UTC (rev 4140) @@ -1,4 +1,4 @@ -/** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP +/** (C) Copyright 1998-2007 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,9 @@ import org.smartfrog.sfcore.prim.TerminationRecord; import org.smartfrog.sfcore.componentdescription.ComponentDescription; +import java.util.Set; + /** * Class used for deploy management. * Proxy for management operations in Prim SmartFrog components. @@ -77,11 +79,17 @@ *@param attribValue Value of the attribute *@throws Exception If any error */ - public static void modifyAttribute(Object obj, Object attribName, Object attribValue) throws Exception { + public static void modifyAttribute(Object obj, Object attribName, Object attribValue, Object attribTags) throws Exception { if (obj instanceof Prim) { ((Prim)obj).sfReplaceAttribute(attribName, attribValue); + if (attribTags != null){ + ((Prim)obj).sfAddTags(attribName,(Set)attribTags); + } } else if (obj instanceof ComponentDescription){ ((ComponentDescription)obj).sfReplaceAttribute(attribName, attribValue); + if (attribTags != null){ + ((ComponentDescription)obj).sfAddTags(attribName,(Set)attribTags); + } } } Modified: trunk/core/smartfrog/src/org/smartfrog/services/management/NewAttributeDialog.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/services/management/NewAttributeDialog.java 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/services/management/NewAttributeDialog.java 2007-05-16 15:57:53 UTC (rev 4140) @@ -1,4 +1,4 @@ -/** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP +/** (C) Copyright 1998-2007 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -32,6 +32,7 @@ import org.smartfrog.sfcore.logging.LogSF; import org.smartfrog.sfcore.logging.LogFactory; import org.smartfrog.sfcore.common.ContextImpl; +import org.smartfrog.services.display.WindowUtilities; import javax.swing.*; import java.awt.*; @@ -50,12 +51,15 @@ private JButton jButtonSave = new JButton(); /** Cancel Button. */ private JButton jButtonCancel = new JButton(); - /** Label type. */ - private JLabel jLabelType = new JLabel(); + /** Label name. */ private JLabel jLabelName = new JLabel(); /** Text filed. */ private JTextField NamejTextField = new JTextField(); + /** Label name. */ + private JLabel jLabelTags = new JLabel(); + /** Text filed. */ + private JTextField tagsjTextField = new JTextField(); /** Label value. */ private JLabel jLabelValue = new JLabel(); /** Scrool pane. */ @@ -78,8 +82,7 @@ * @param modal modal * @param attribute set of attributes */ - public NewAttributeDialog(Frame frame, String title, boolean modal, - Object[] attribute) { + public NewAttributeDialog(Frame frame, String title, boolean modal, Object[] attribute) { super(frame, title, modal); this.attribute = attribute; @@ -106,6 +109,9 @@ } this.ValuejTextArea.setText(value); } + if (attribute[2] != null) { + this.tagsjTextField.setText(attribute[2].toString()); + } } } catch (Exception ex) { if (sfLog().isErrorEnabled()) sfLog().error (ex); @@ -132,43 +138,54 @@ jButtonCancel_actionPerformed(e); } }); - //jLabelType.setText("Value"); + jLabelName.setText("Name"); - NamejTextField.setNextFocusableComponent(ValuejTextArea); + NamejTextField.setNextFocusableComponent(tagsjTextField); NamejTextField.setText(""); + + jLabelTags.setText("Tags"); + tagsjTextField.setNextFocusableComponent(ValuejTextArea); + tagsjTextField.setText(""); + jLabelValue.setText("Value"); ValuejTextArea.setNextFocusableComponent(jButtonSave); panel.setMinimumSize(new Dimension(550, 300)); panel.setPreferredSize(new Dimension(550, 300)); jLabel1.setText("(use SF syntax)"); - getContentPane().add(panel); -// panel.add(TypejComboBox, -// new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, -// GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, -// new Insets(15, 13, 0, 23), 151, 0)); + getContentPane().add(panel); + //Name panel.add(NamejTextField, - new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(17, 13, 0, 23), 302, 0)); + new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0 + , GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(17, 13, 0, 23), 302, 0)); panel.add(jLabelName, - new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 - ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(17, 24, 0, 0), 0, 0)); - // panel.add(jLabelType, - // new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 - // ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(17, 24, 0, 8), 0, 0)); + new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 + , GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(17, 24, 0, 0), 0, 0)); + //Tags + panel.add(jLabelTags, + new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 + , GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(17, 24, 0, 8), 0, 0)); + panel.add(tagsjTextField, + new GridBagConstraints(1, 1, 2, 1, 1.0, 0.0, + GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, + new Insets(15, 13, 0, 23), 151, 0)); + //Buttons panel.add(jButtonCancel, - new GridBagConstraints(2, 3, 1, 1, 0.0, 0.0 - ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(16, 22, 13, 89), 0, 0)); + new GridBagConstraints(2, 4, 1, 1, 0.0, 0.0 + , GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(16, 22, 13, 89), 0, 0)); panel.add(jButtonSave, - new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0 - ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(16, 85, 13, 0), 12, 0)); - panel.add(jScrollPane1, - new GridBagConstraints(1, 1, 2, 2, 1.0, 1.0 - ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(19, 13, 0, 23), 300, 130)); - panel.add(jLabelValue, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 - ,GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(13, 24, 0, 0), 0, 0)); - panel.add(jLabel1, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0 - ,GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); - jScrollPane1.getViewport().add(ValuejTextArea, null); + new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0 + , GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(16, 85, 13, 0), 12, 0)); + //Value + panel.add(jScrollPane1, + new GridBagConstraints(1, 2, 2, 2, 1.0, 1.0 + , GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(19, 13, 0, 23), 300, 130)); + panel.add(jLabelValue, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0 + , GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(13, 24, 0, 0), 0, 0)); + panel.add(jLabel1, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0 + , GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + + jScrollPane1.getViewport().add(ValuejTextArea, null); + } /** @@ -178,13 +195,20 @@ void jButtonSave_actionPerformed(ActionEvent e) { //Save values in parent! //Return with attribute value pair. Array[]; - if ((this.NamejTextField.getText() != null) && - (!this.NamejTextField.getText().equals(""))) { - attribute[0] = this.NamejTextField.getText(); - attribute[1] = parseValue(ValuejTextArea.getText(),"sf"); - } else { - attribute[0] = null; - attribute[1] = null; + try { + if ((this.NamejTextField.getText() != null) && + (!this.NamejTextField.getText().equals(""))) { + attribute[0] = this.NamejTextField.getText(); + attribute[1] = parseValue(ValuejTextArea.getText(),"sf"); + attribute[2] = parseTags(tagsjTextField.getText(),"sf"); + } else { + attribute[0] = null; + attribute[1] = null; + attribute[2] = null; + } + } catch (Exception e1) { + if (sfLog().isErrorEnabled()) sfLog().error (e1); + WindowUtilities.showError(this,"Failed to modify attribute '"+attribute.toString()+"'. \n"+e1.toString()); } this.dispose(); @@ -282,16 +306,34 @@ return null; } + /** + * Parse + * @param textToParse text to be parsed + * @param language language + * @return Object + */ + public Object parseTags(String textToParse, String language) { + try { + SFParser parser = new SFParser(language); + return parser.sfParseTags( textToParse); + } catch (Throwable ex) { + if (sfLog().isErrorEnabled()) sfLog().error (ex); + } + return null; + } - /** * Interface Method. * @param e event */ void jButtonCancel_actionPerformed(ActionEvent e) { - //Return null - attribute[0] = null; - attribute[1] = null; + try { + attribute[0] = null; + attribute[1] = null; + attribute[2] = null; + } catch (Exception e1) { + if (sfLog().isErrorEnabled()) sfLog().error (e1); + } this.dispose(); } Modified: trunk/core/smartfrog/src/org/smartfrog/services/management/PopUpTable.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/services/management/PopUpTable.java 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/services/management/PopUpTable.java 2007-05-16 15:57:53 UTC (rev 4140) @@ -1,4 +1,4 @@ -/** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP +/** (C) Copyright 1998-2007 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -156,15 +156,17 @@ } Object name = null; Object value = null; + Object tags = null; if (row == -1) { name = ""; } else { name = (tempTable.getValueAt(row, 0)); value = tempTable.getValueAt(row, 1); + tags = tempTable.getValueAt(row, 2); } - modifyAttribute(name, value); + modifyAttribute(name, value, tags); // Entry pointed in the tree } else if (source==menuItemInstrospectValue){ @@ -200,18 +202,21 @@ *@param name Name of the object *@param value Value of the object */ - void modifyAttribute(Object name, Object value) { - Object[] attribute = new Object[2]; + void modifyAttribute(Object name, Object value, Object tags) { + Object[] attribute = new Object[3]; attribute[0] = name; attribute[1] = value; + attribute[2] = tags; // try to get the object value try { TreePath tpath = (tempTree).getSelectionPath(); Object node = getNode(); if (node instanceof Prim) { attribute[1] = ((Prim)node).sfResolve(name.toString()); + attribute[2] = ((Prim)node).sfGetTags(name.toString()); } else if (node instanceof ComponentDescription) { attribute[1] = ((ComponentDescription)node).sfResolve(name.toString()); + attribute[2] = ((ComponentDescription)node).sfGetTags(name.toString()); } } catch (Exception ex) { if (sfLog().isIgnoreEnabled()) sfLog().ignore ("Failed to read real value during modify attribute '"+name,ex); @@ -224,8 +229,8 @@ if (attribute != null) { if (attribute[0] == null) { - if (sfLog().isTraceEnabled()) sfLog().trace ("No attribute to modify"); - WindowUtilities.showError(this,"No attribute to modify"); + if (sfLog().isTraceEnabled()) sfLog().trace ("No attribute was modified"); + WindowUtilities.showError(this,"No attribute was modified"); return; } if (attribute[1] == null) { @@ -237,7 +242,7 @@ try { TreePath tpath = (tempTree).getSelectionPath(); Object node = getNode(); - modify(node,attribute[0],attribute[1]); + modify(node,attribute[0],attribute[1],attribute[2]); //((Prim) (((DeployEntry) (tpath.getLastPathComponent())).getEntry())).sfReplaceAttribute(attribute[0],attribute[1]); } catch (Exception ex) { if (sfLog().isErrorEnabled()) sfLog().error ("Failed to modify '"+name,ex); @@ -342,10 +347,10 @@ *@param attribName Attribute Name *@param value Attribute value */ - void modify(Object obj, Object attribName, Object value) { + void modify(Object obj, Object attribName, Object value, Object tags) { if ((obj instanceof Prim)||(obj instanceof ComponentDescription)) { try { - org.smartfrog.services.management.DeployMgnt.modifyAttribute(obj, attribName, value); + org.smartfrog.services.management.DeployMgnt.modifyAttribute(obj, attribName, value, tags); parent.refreshTable(); } catch (Exception ex) { if (sfLog().isErrorEnabled()) sfLog().error ("Failed to modify '"+attribName,ex); Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/csf/DefaultParser.jj =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/csf/DefaultParser.jj 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/csf/DefaultParser.jj 2007-05-16 15:57:53 UTC (rev 4140) @@ -502,6 +502,18 @@ { return res; } } + /* + * Entry point for tags parser (e.g. for tags in management console) + */ + Object TagsSet() : +{ + Set tags = new HashSet(); +} +{ + [ <LBRACKET> Tags(tags) <RBRACKET> ] <EOF> + { return tags; } +} + /* * Main body of grammar */ Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/csf/SFParser.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/csf/SFParser.java 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/csf/SFParser.java 2007-05-16 15:57:53 UTC (rev 4140) @@ -1,4 +1,4 @@ -/** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP +/** (C) Copyright 1998-2007 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -23,8 +23,6 @@ import java.io.InputStream; import org.smartfrog.SFSystem; -import org.smartfrog.sfcore.common.SmartFrogParseException; -import org.smartfrog.sfcore.common.SmartFrogCoreProperty; import org.smartfrog.sfcore.languages.csf.csfcomponentdescription.CSFComponentDescription; import org.smartfrog.sfcore.languages.sf.IncludeHandler; import org.smartfrog.sfcore.parser.Phases; @@ -34,13 +32,17 @@ import org.smartfrog.sfcore.security.SFClassLoader; -import java.lang.reflect.Constructor; - +import org.smartfrog.sfcore.common.SmartFrogParseException; +import org.smartfrog.sfcore.common.MessageKeys; import org.smartfrog.sfcore.common.MessageUtil; -import org.smartfrog.sfcore.common.MessageKeys; +import org.smartfrog.sfcore.common.SmartFrogCoreProperty; import org.smartfrog.sfcore.common.SmartFrogException; +import java.lang.reflect.Constructor; + + + /** * Implements the default Parser interface for SmartFrog parsers. This * implementation uses DefaultParser (generated by sfparser.jj) to parse @@ -286,4 +288,20 @@ throw new SmartFrogParseException("Error parsing primitive value from InputStream", pe); } } + + /** + * Parses tags from given string. This is NOT a cheap method since a + * new DefaultParser will be constructed to create the reference. + * + *@param is input stream to parse + *@return parsed value + *@exception SmartFrogParseException failure while parsing value + */ + public Object sfParseTags(InputStream is) throws SmartFrogParseException { + try { + return (new org.smartfrog.sfcore.languages.csf.DefaultParser(is, null)).TagsSet(); + } catch (ParseException pe){ + throw new SmartFrogParseException ("Error parsing Tags from InputStream", pe); + } + } } Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/DefaultParser.jj =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/DefaultParser.jj 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/DefaultParser.jj 2007-05-16 15:57:53 UTC (rev 4140) @@ -434,6 +434,18 @@ { return res; } } + /* + * Entry point for tags parser (e.g. for tags in management console) + */ + Object TagsSet() : +{ + Set tags = new HashSet(); +} +{ + [ <LBRACKET> Tags(tags) <RBRACKET> ] <EOF> + { return tags; } +} + /* * Main body of grammar */ Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/SFParser.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/SFParser.java 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/SFParser.java 2007-05-16 15:57:53 UTC (rev 4140) @@ -1,4 +1,4 @@ -/** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP +/** (C) Copyright 1998-2007 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -287,4 +287,21 @@ throw new SmartFrogParseException ("Error parsing primitive value from InputStream", pe); } } + + /** + * Parses tags from given string. This is NOT a cheap method since a + * new DefaultParser will be constructed to create the reference. + * + *@param is input stream to parse + *@return parsed value + *@exception SmartFrogParseException failure while parsing value + */ + public Object sfParseTags(InputStream is) throws SmartFrogParseException { + try { + return (new DefaultParser(is, null)).TagsSet(); + } catch (ParseException pe){ + throw new SmartFrogParseException ("Error parsing Tags from InputStream", pe); + } + } + } Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/Parser.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/Parser.java 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/Parser.java 2007-05-16 15:57:53 UTC (rev 4140) @@ -103,4 +103,16 @@ * @exception SmartFrogParseException failed to parse primtiive value */ public ComponentDescription sfParseComponentDescription(String txt) throws SmartFrogCompilationException; + + /** + * Parses tags from a string. + * + * @param txt string to parse for a value + * + * @return parsed value + * + * @exception SmartFrogParseException failed to parse primtiive value + */ + public Object sfParseTags(String txt) throws SmartFrogCompilationException; + } Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/SFParser.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/SFParser.java 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/SFParser.java 2007-05-16 15:57:53 UTC (rev 4140) @@ -1,4 +1,4 @@ -/** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP +/** (C) Copyright 1998-2007 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -26,12 +26,21 @@ import java.io.IOException; import org.smartfrog.SFSystem; -import org.smartfrog.sfcore.common.*; +import org.smartfrog.sfcore.common.SmartFrogParseException; +import org.smartfrog.sfcore.common.MessageKeys; +import org.smartfrog.sfcore.common.MessageUtil; +import org.smartfrog.sfcore.common.SmartFrogCoreProperty; +import org.smartfrog.sfcore.common.SmartFrogCompilationException; +import org.smartfrog.sfcore.common.SmartFrogRuntimeException; +import org.smartfrog.sfcore.common.SmartFrogException; + + import org.smartfrog.sfcore.reference.Reference; import org.smartfrog.sfcore.security.SFClassLoader; + import org.smartfrog.sfcore.componentdescription.ComponentDescription; -import org.smartfrog.sfcore.languages.sf.sfcomponentdescription.*; +import org.smartfrog.sfcore.languages.sf.sfcomponentdescription.SFComponentDescription; /** * Implements the Parser interface for SmartFrog parsers. This implementation @@ -280,7 +289,7 @@ } - /** + /** * Parses any value from an input stream. (the meaning of "any" is language dependant) * * @param is input stream to parse for a value @@ -331,8 +340,6 @@ return o; } - - /** * Parses a primitive value from a string. (the meaning of primitive is language dependant) * @@ -347,6 +354,33 @@ } /** + * Parses tags from an input stream. + * + * @param is input stream to parse for a value + * + * @return parsed value + * + * @exception org.smartfrog.sfcore.common.SmartFrogParseException failed to parse tags + */ + public Object sfParseTags(InputStream is) throws SmartFrogCompilationException { + Object o = parser.sfParseTags(is); + return o; + } + + /** + * Parses tags from a string. + * + * @param txt string to parse for a value + * + * @return parsed value + * + * @exception SmartFrogParseException failed to parse any value + */ + public Object sfParseTags(String txt) throws SmartFrogCompilationException { + return sfParseTags(new ByteArrayInputStream(txt.getBytes())); + } + + /** * Parses a component description from an input stream. * All the langauge phases will have been applied, and the conversion to ComponentDescription * carried out. Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/StreamLanguageParser.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/StreamLanguageParser.java 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/StreamLanguageParser.java 2007-05-16 15:57:53 UTC (rev 4140) @@ -23,9 +23,9 @@ import java.io.InputStream; import org.smartfrog.sfcore.common.SmartFrogParseException; -import org.smartfrog.sfcore.reference.Reference; + /** * Defines the actual low-level parser interface. Objects that implement this * interface provide the means to parse SmartFrog text into component @@ -91,7 +91,18 @@ * * @return parsed value * - * @exception org.smartfrog.sfcore.common.SmartFrogParseException failed to parse primtiive value + * @exception org.smartfrog.sfcore.common.SmartFrogParseException failed to parse primitive value */ public Object sfParsePrimitiveValue(InputStream is) throws SmartFrogParseException; + + /** + * Parses tags from an input stream. + * + * @param is string to parse for a value + * + * @return parsed value + * + * @exception org.smartfrog.sfcore.common.SmartFrogParseException failed to parse tags + */ + public Object sfParseTags(InputStream is) throws SmartFrogParseException; } Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/StreamParser.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/StreamParser.java 2007-05-15 15:38:14 UTC (rev 4139) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/parser/StreamParser.java 2007-05-16 15:57:53 UTC (rev 4140) @@ -98,6 +98,17 @@ public Object sfParsePrimitiveValue(InputStream is) throws SmartFrogCompilationException; /** + * Parses tags from an input stream. + * + * @param is string to parse for a value + * + * @return parsed value + * + * @exception org.smartfrog.sfcore.common.SmartFrogParseException failed to parse tags + */ + public Object sfParseTags(InputStream is) throws SmartFrogCompilationException; + + /** * Parses a component description from an input stream. * All the language phases will have been applied, and the conversion to ComponentDescription * carried out. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |