isSet property sheet working for SWT and also prototypes with style bits pre-set and {parentComposite}
diff --git a/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/PTInfixExpression.java b/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/PTInfixExpression.java
index 9e6ab32..da63fe7 100644
--- a/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/PTInfixExpression.java
+++ b/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/PTInfixExpression.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: PTInfixExpression.java,v $
- *  $Revision: 1.1 $  $Date: 2004/01/23 22:53:21 $ 
+ *  $Revision: 1.2 $  $Date: 2004/03/11 01:48:01 $ 
  */
 import org.eclipse.emf.common.util.EList;
 
@@ -132,5 +132,17 @@
 	 * @generated
 	 */
 	EList getExtendedOperands();
+	
+	/**
+	 * Compress the expression
+	 * If there is no left operand and a right operand, or vice versa, and no extended operands
+	 * return the remaining single operand
+	 * If there is no left operand and a right and some extended ones shuffle everything along
+	 * so that the right becomes the left and the first extended moves into the right
+	 * or if no right and a left then just move the first extended into the right
+	 * 
+	 * @since 1.0.0
+	 */
+	PTExpression asCompressedExpression();
 
 } // InfixExpression
diff --git a/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/impl/PTInfixExpressionImpl.java b/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/impl/PTInfixExpressionImpl.java
index 95c024c..d84035c 100644
--- a/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/impl/PTInfixExpressionImpl.java
+++ b/plugins/org.eclipse.jem/javainst/org/eclipse/jem/internal/instantiation/impl/PTInfixExpressionImpl.java
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*
  *  $RCSfile: PTInfixExpressionImpl.java,v $
- *  $Revision: 1.1 $  $Date: 2004/01/23 22:53:21 $ 
+ *  $Revision: 1.2 $  $Date: 2004/03/11 01:48:01 $ 
  */
 import java.util.Collection;
 
@@ -363,4 +363,34 @@
 		}
 		visitor.endVisit(this);
 	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jem.internal.instantiation.PTInfixExpression#asCompressedExpression()
+	 */
+	public PTExpression asCompressedExpression() {
+		// If no left and no right
+		if(getLeftOperand() == null && getRightOperand() != null){
+			// no extends so just use the right operand
+			if(getExtendedOperands().size() == 0){
+				return getRightOperand();
+			} else {
+				// The right becomes the new left
+				setLeftOperand(getRightOperand());
+				// The first operand becomes the right one
+				setRightOperand((PTExpression) getExtendedOperands().get(0));
+				getExtendedOperands().remove(1);
+				return this;
+			}
+		} else if (getRightOperand() == null && getLeftOperand() != null){
+			// no extends so just use the left operand
+			if(getExtendedOperands().size() == 0){
+				return getLeftOperand();
+			} else {
+				// The right becomes the first extended
+				setRightOperand((PTExpression)getExtendedOperands().get(1));
+				getExtendedOperands().remove(1);
+				return this;
+			}			
+		}	
+		return this;
+	}
 } //InfixExpressionImpl