Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] C Model Update - show visibility for fields

Title: Not Applied: [cdt-patch] C Model Update - show the static elements in outline view

This patch :

 

-          Adds icons for fields visibility ( copy to \org.eclipse.cdt.ui\icons\full\obj16)

-          Adds C Model elements for templates, enumerations, TypeDefs and Using

-          Shows the const decorator for variables and fields icons ( modifies the gif file in \org.eclipse.cdt.ui\icons\full\ovr16).

-          Renames icon files for method visibility.

Icons are renamed to method_public_obj.gif, method_protected_obj.gif, method_private_obj.gif

 

Thanks

Hoda

Index: model/org/eclipse/cdt/core/model/IDeclaration.java
===================================================================
RCS file: model/org/eclipse/cdt/core/model/IDeclaration.java
diff -N model/org/eclipse/cdt/core/model/IDeclaration.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/core/model/IDeclaration.java	28 Mar 2003 17:56:01 -0000
@@ -0,0 +1,28 @@
+package org.eclipse.cdt.core.model;
+
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ * 
+ * Contributors: 
+ * Rational Software - Initial API and implementation
+***********************************************************************/
+
+public interface IDeclaration extends ICElement, ISourceManipulation, ISourceReference {
+	boolean isStatic();
+	boolean isConst();
+	boolean isVolatile();
+	
+	/**
+	 * Returns the access Control of the member. The access qualifier
+	 * can be examine using the AccessControl class.
+	 *
+	 * @exception CModelException if this element does not exist or if an
+	 *      exception occurs while accessing its corresponding resource.
+	 * @see IAccessControl
+	 */
+	int getAccessControl();	
+}
Index: model/org/eclipse/cdt/core/model/IFunctionDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IFunctionDeclaration.java,v
retrieving revision 1.2
diff -u -r1.2 IFunctionDeclaration.java
--- model/org/eclipse/cdt/core/model/IFunctionDeclaration.java	26 Mar 2003 16:03:03 -0000	1.2
+++ model/org/eclipse/cdt/core/model/IFunctionDeclaration.java	28 Mar 2003 17:56:01 -0000
@@ -8,7 +8,7 @@
 /**
  * Represents a function
  */
-public interface IFunctionDeclaration extends ICElement, ISourceReference, ISourceManipulation {
+public interface IFunctionDeclaration extends IDeclaration {
 
 	/**
 	 * Returns the type signatures of the exceptions this method throws,
@@ -63,14 +63,4 @@
 	 * Returns the signature of the method. 
 	 */	
 	String getSignature();
-
-	/**
-	 * Returns the access Control of the member. The access qualifier
-	 * can be examine using the AccessControl class.
-	 *
-	 * @exception CModelException if this element does not exist or if an
-	 *      exception occurs while accessing its corresponding resource.
-	 * @see IAccessControl
-	 */
-	int getAccessControl();
 }
Index: model/org/eclipse/cdt/core/model/IMember.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IMember.java,v
retrieving revision 1.2
diff -u -r1.2 IMember.java
--- model/org/eclipse/cdt/core/model/IMember.java	26 Mar 2003 16:03:03 -0000	1.2
+++ model/org/eclipse/cdt/core/model/IMember.java	28 Mar 2003 17:56:01 -0000
@@ -10,46 +10,12 @@
  * This set consists of <code>IType</code>, <code>IMethod</code>, 
  * <code>IField</code>.
  */
-public interface IMember extends ICElement, ISourceReference, ISourceManipulation {
+public interface IMember extends IDeclaration {
 
 	static final int V_PUBLIC = 0;
 	static final int V_PROTECTED = 1;
 	static final int V_PRIVATE = 2;
 
-
-	/**
-	 * Returns true if the member has class scope. For example static methods in
-	 * C++ have class scope
-	 * 
-	 *
-	 * @exception CModelException if this element does not exist or if an
-	 *      exception occurs while accessing its corresponding resource.
-	 */
-	public boolean hasClassScope();
-
-	/**
-	 * Returns whether this method/field is declared constant.
-	 *
-	 * @exception CModelException if this element does not exist or if an
-	 *      exception occurs while accessing its corresponding resource.
-	 */
-	public boolean isConst();
-	
-	/**
-	 * Returns if this member is volatile or not
-	 * @return boolean
-	 */
-	public boolean isVolatile();
-
-	/**
-	 * Returns the access Control of the member. The access qualifier
-	 * can be examine using the AccessControl class.
-	 *
-	 * @exception CModelException if this element does not exist or if an
-	 *      exception occurs while accessing its corresponding resource.
-	 * @see IAccessControl
-	 */
-	public int getAccessControl();
 	/**
 	 * Returns the member's visibility
 	 * V_PRIVATE = 0 V_PROTECTED = 1 V_PUBLIC = 2
Index: model/org/eclipse/cdt/core/model/IStructure.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IStructure.java,v
retrieving revision 1.2
diff -u -r1.2 IStructure.java
--- model/org/eclipse/cdt/core/model/IStructure.java	23 Jan 2003 16:39:21 -0000	1.2
+++ model/org/eclipse/cdt/core/model/IStructure.java	28 Mar 2003 17:56:01 -0000
@@ -8,7 +8,7 @@
 /**
  * Represent struct(ure), class or union.
  */
-public interface IStructure extends IInheritance, IParent, ICElement, IVariableDeclaration {
+public interface IStructure extends IInheritance, IParent, IDeclaration {
 	//public String instantiatesTemplate();
 
 	public IField getField(String name);
Index: model/org/eclipse/cdt/core/model/IVariable.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariable.java,v
retrieving revision 1.2
diff -u -r1.2 IVariable.java
--- model/org/eclipse/cdt/core/model/IVariable.java	26 Mar 2003 16:03:03 -0000	1.2
+++ model/org/eclipse/cdt/core/model/IVariable.java	28 Mar 2003 17:56:01 -0000
@@ -8,9 +8,6 @@
 /**
  * Represents a global variable.
  */
-public interface IVariable extends ICElement , ISourceManipulation, ISourceReference {
-	public String getTypeName();
-	public void setTypeName(String type);
+public interface IVariable extends IVariableDeclaration {
 	public String getInitializer();
-	public int getAccessControl() throws CModelException;
 }
Index: model/org/eclipse/cdt/core/model/IVariableDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/IVariableDeclaration.java,v
retrieving revision 1.3
diff -u -r1.3 IVariableDeclaration.java
--- model/org/eclipse/cdt/core/model/IVariableDeclaration.java	26 Mar 2003 16:03:03 -0000	1.3
+++ model/org/eclipse/cdt/core/model/IVariableDeclaration.java	28 Mar 2003 17:56:01 -0000
@@ -8,9 +8,7 @@
 /**
  * Represents the declaration of a variable.
  */
-public interface IVariableDeclaration extends ICElement, ISourceManipulation, ISourceReference {
-
+public interface IVariableDeclaration extends IDeclaration {
 	public String getTypeName();
 	public void setTypeName(String type);
-	public int getAccessControl();
 }
Index: model/org/eclipse/cdt/internal/core/model/Enumeration.java
===================================================================
RCS file: model/org/eclipse/cdt/internal/core/model/Enumeration.java
diff -N model/org/eclipse/cdt/internal/core/model/Enumeration.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/internal/core/model/Enumeration.java	28 Mar 2003 17:56:01 -0000
@@ -0,0 +1,75 @@
+package org.eclipse.cdt.internal.core.model;
+
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ * 
+ * Contributors: 
+ * Rational Software - Initial API and implementation
+***********************************************************************/
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IEnumeration;
+
+public class Enumeration extends SourceManipulation implements IEnumeration{
+
+	public Enumeration(ICElement parent, String name) {
+		super(parent, name, CElement.C_ENUMERATION);
+	}
+
+	protected CElementInfo createElementInfo () {
+		return new SourceManipulationInfo(this);
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IVariable#getInitializer()
+	 */
+	public String getInitializer() {
+		return null;
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IVariableDeclaration#getTypeName()
+	 */
+	public String getTypeName() {
+		return null;
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IVariableDeclaration#setTypeName(java.lang.String)
+	 */
+	public void setTypeName(String type) {
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IDeclaration#getAccessControl()
+	 */
+	public int getAccessControl() {
+		return 0;
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IDeclaration#isConst()
+	 */
+	public boolean isConst() {
+		return false;
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
+	 */
+	public boolean isStatic() {
+		return false;
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
+	 */
+	public boolean isVolatile() {
+		return false;
+	}
+
+}
Index: model/org/eclipse/cdt/internal/core/model/Field.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Field.java,v
retrieving revision 1.3
diff -u -r1.3 Field.java
--- model/org/eclipse/cdt/internal/core/model/Field.java	26 Mar 2003 16:03:03 -0000	1.3
+++ model/org/eclipse/cdt/internal/core/model/Field.java	28 Mar 2003 17:56:02 -0000
@@ -22,8 +22,8 @@
 		return getFieldInfo().isMutable();
 	}
 
-	public void setIsMutable(boolean mutable){
-		getFieldInfo().setIsMutable(mutable);
+	public void setMutable(boolean mutable){
+		getFieldInfo().setMutable(mutable);
 	}
 
 	public String getTypeName() {
@@ -38,16 +38,24 @@
 		return getFieldInfo().isConst();
 	}
 
-	public void setIsConst(boolean isConst) {
-		getFieldInfo().setIsConst(isConst);
+	public void setConst(boolean isConst) {
+		getFieldInfo().setConst(isConst);
 	}
 
 	public boolean isVolatile() {
 		return getFieldInfo().isVolatile();
 	}
 
-	public void setIsVolatile(boolean isVolatile) {
-		getFieldInfo().setIsVolatile(isVolatile);
+	public void setVolatile(boolean isVolatile) {
+		getFieldInfo().setVolatile(isVolatile);
+	}
+
+	public boolean isStatic() {
+		return getFieldInfo().isStatic();
+	}
+
+	public void setStatic(boolean isStatic) {
+		getFieldInfo().setStatic(isStatic);
 	}
 
 	public int getVisibility() {
@@ -57,6 +65,7 @@
 	public void setVisibility(int visibility) {
 		getFieldInfo().setVisibility(visibility);
 	}
+
 
 	public FieldInfo getFieldInfo(){
 		return (FieldInfo) getElementInfo();
Index: model/org/eclipse/cdt/internal/core/model/FieldInfo.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FieldInfo.java,v
retrieving revision 1.2
diff -u -r1.2 FieldInfo.java
--- model/org/eclipse/cdt/internal/core/model/FieldInfo.java	27 Mar 2003 16:05:18 -0000	1.2
+++ model/org/eclipse/cdt/internal/core/model/FieldInfo.java	28 Mar 2003 17:56:02 -0000
@@ -20,6 +20,7 @@
 	boolean isConst = false;
 	boolean isVolatile = false;
 	boolean isMutable = false;
+	boolean isStatic = false;
 	int visibility;
 	
 	protected FieldInfo (CElement element) {
@@ -48,6 +49,7 @@
 		&&  (isVolatile == otherInfo.isVolatile())
 		&& 	(isMutable == otherInfo.isMutable())
 		&& 	(visibility == otherInfo.getVisibility())
+		&& 	(isStatic == otherInfo.isStatic())
 		)
 			return true;
 		else
@@ -66,7 +68,7 @@
 		return isConst;
 	}
 
-	protected void setIsConst(boolean isConst){
+	protected void setConst(boolean isConst){
 		this.isConst = isConst;
 	}
 
@@ -74,15 +76,23 @@
 		return isVolatile;
 	}
 
-	protected void setIsVolatile(boolean isVolatile){
+	protected void setVolatile(boolean isVolatile){
 		this.isVolatile = isVolatile;
 	}
 
+	public boolean isStatic() {
+		return isStatic;
+	}
+
+	public void setStatic(boolean isStatic) {
+		this.isStatic = isStatic;
+	}
+
 	protected boolean isMutable(){
 		return isMutable;
 	}
 
-	protected void setIsMutable(boolean mutable){
+	protected void setMutable(boolean mutable){
 		this.isMutable = mutable;
 	}
 	/**
@@ -100,5 +110,4 @@
 	public void setVisibility(int visibility) {
 		this.visibility = visibility;
 	}
-
 }
Index: model/org/eclipse/cdt/internal/core/model/FunctionDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionDeclaration.java,v
retrieving revision 1.3
diff -u -r1.3 FunctionDeclaration.java
--- model/org/eclipse/cdt/internal/core/model/FunctionDeclaration.java	26 Mar 2003 16:10:35 -0000	1.3
+++ model/org/eclipse/cdt/internal/core/model/FunctionDeclaration.java	28 Mar 2003 17:56:02 -0000
@@ -51,9 +51,7 @@
 	}		
 		
 	public String getSignature(){
-		String sig = getReturnType();
-		sig += " ";
-		sig += getElementName();
+		String sig = getElementName();
 		if(getNumberOfParameters() > 0){
 			sig += "(";
 			String[] paramTypes = getParameterTypes();
@@ -79,6 +77,7 @@
 		return getFunctionInfo().getAccessControl();
 	}
 
+
 	public String[] getExceptions(){
 		return new String[] {};
 	}
@@ -98,4 +97,44 @@
 		);
 	}
 	
+	/**
+	 * FunctionDeclarations and Functions can not be constant 
+	 * @see org.eclipse.cdt.core.model.IDeclaration#isConst()
+	 */
+	public boolean isConst(){
+		return false;
+	}
+
+	/**
+	 * Returns the isStatic.
+	 * @return boolean
+	 */
+	public boolean isStatic() {
+		return getFunctionInfo().isStatic();
+	}
+
+	/**
+	 * Returns the isVolatile.
+	 * @return boolean
+	 */
+	public boolean isVolatile() {
+		return getFunctionInfo().isVolatile();
+	}
+
+	/**
+	 * Sets the isStatic.
+	 * @param isStatic The isStatic to set
+	 */
+	public void setStatic(boolean isStatic) {
+		getFunctionInfo().setStatic(isStatic);
+	}
+
+	/**
+	 * Sets the isVolatile.
+	 * @param isVolatile The isVolatile to set
+	 */
+	public void setVolatile(boolean isVolatile) {
+		getFunctionInfo().setVolatile(isVolatile);
+	}
+
 }
Index: model/org/eclipse/cdt/internal/core/model/FunctionInfo.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/FunctionInfo.java,v
retrieving revision 1.3
diff -u -r1.3 FunctionInfo.java
--- model/org/eclipse/cdt/internal/core/model/FunctionInfo.java	27 Mar 2003 16:05:18 -0000	1.3
+++ model/org/eclipse/cdt/internal/core/model/FunctionInfo.java	28 Mar 2003 17:56:02 -0000
@@ -10,6 +10,9 @@
 	protected int flags;
 	protected String returnType = "";
 	protected int numOfParams;
+	protected boolean isStatic;
+	protected boolean isVolatile;
+	
 
 	protected FunctionInfo (CElement element) {
 		super(element);
@@ -31,4 +34,36 @@
 	protected void setReturnType(String type){
 		returnType = type;
 	}	
+	/**
+	 * Returns the isStatic.
+	 * @return boolean
+	 */
+	public boolean isStatic() {
+		return isStatic;
+	}
+
+	/**
+	 * Returns the isVolatile.
+	 * @return boolean
+	 */
+	public boolean isVolatile() {
+		return isVolatile;
+	}
+
+	/**
+	 * Sets the isStatic.
+	 * @param isStatic The isStatic to set
+	 */
+	public void setStatic(boolean isStatic) {
+		this.isStatic = isStatic;
+	}
+
+	/**
+	 * Sets the isVolatile.
+	 * @param isVolatile The isVolatile to set
+	 */
+	public void setVolatile(boolean isVolatile) {
+		this.isVolatile = isVolatile;
+	}
+
 }
Index: model/org/eclipse/cdt/internal/core/model/MethodDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodDeclaration.java,v
retrieving revision 1.1
diff -u -r1.1 MethodDeclaration.java
--- model/org/eclipse/cdt/internal/core/model/MethodDeclaration.java	26 Mar 2003 16:03:03 -0000	1.1
+++ model/org/eclipse/cdt/internal/core/model/MethodDeclaration.java	28 Mar 2003 17:56:02 -0000
@@ -16,6 +16,8 @@
 
 public class MethodDeclaration extends FunctionDeclaration implements IMethodDeclaration{
 	
+	boolean isConst;
+	boolean isVolatile;
 
 	public MethodDeclaration(ICElement parent, String name){
 		super(parent, name, CElement.C_METHOD_DECLARATION);
@@ -52,55 +54,49 @@
 	}
 
 	public void setIsAbstract(boolean isAbstract){
-		getMethodInfo().setIsAbstract(isAbstract);
-	}
-
-	public boolean isStatic(){
-		return getMethodInfo().isStatic();
-	}
-
-	public void setIsStatic(boolean isStatic){
-		getMethodInfo().setIsStatic(isStatic);
+		getMethodInfo().setAbstract(isAbstract);
 	}
 
 	public boolean isInline(){
 		return getMethodInfo().isInline();
 	}
 
-	public void setIsInline(boolean isInline){
-		getMethodInfo().setIsInline(isInline);
+	public void setInline(boolean isInline){
+		getMethodInfo().setInline(isInline);
 	}
 
 	public boolean isVirtual(){
 		return getMethodInfo().isVirtual();
 	}
 
-	public void setIsVirtual(boolean isVirtual){
-		getMethodInfo().setIsVirtual(isVirtual);
+	public void setVirtual(boolean isVirtual){
+		getMethodInfo().setVirtual(isVirtual);
 	}
 
 	public boolean isFriend(){
 		return getMethodInfo().isFriend();
 	}
 
-	public void setIsFriend(boolean isFriend){
-		getMethodInfo().setIsFriend(isFriend);
+	public void setFriend(boolean isFriend){
+		getMethodInfo().setFriend(isFriend);
 	}
 
 	public boolean isConst(){
-		return getMethodInfo().isConst();
+		return isConst;
 	}
 
-	public void setIsConst(boolean isConst){
-		getMethodInfo().setIsConst(isConst);
+	public void setConst(boolean isConst){
+		this.isConst = isConst;
+		getMethodInfo().setConst(isConst);
 	}
 
 	public boolean isVolatile(){
-		return getMethodInfo().isVolatile();
+		return isVolatile;
 	}
 
-	public void setIsVolatile(boolean isVolatile){
-		getMethodInfo().setIsVolatile(isVolatile);
+	public void setVolatile(boolean isVolatile){
+		this.isVolatile = isVolatile; 
+		getMethodInfo().setVolatile(isVolatile);
 	}
 
 	public int getVisibility(){
@@ -110,11 +106,6 @@
 	public void setVisibility(int visibility){
 		getMethodInfo().setVisibility(visibility);
 	}
-	// do we need this one or not?
-	// can we get this info from the parser or not?
-	public boolean hasClassScope(){
-		return false;
-	}
 	
 	protected CElementInfo createElementInfo () {
 		return new MethodInfo(this);
@@ -128,7 +119,10 @@
 	 * See if we need anything else to put in equals here
 	 */
 	public boolean equals(Object other) {
-		return ( super.equals(other) );
+		return ( super.equals(other)
+		&& isConst() == ((MethodDeclaration)other).isConst()
+		&& isVolatile() == ((MethodDeclaration)other).isVolatile()
+		);
 	}
 		
 }
Index: model/org/eclipse/cdt/internal/core/model/MethodInfo.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/MethodInfo.java,v
retrieving revision 1.1
diff -u -r1.1 MethodInfo.java
--- model/org/eclipse/cdt/internal/core/model/MethodInfo.java	26 Mar 2003 16:03:03 -0000	1.1
+++ model/org/eclipse/cdt/internal/core/model/MethodInfo.java	28 Mar 2003 17:56:02 -0000
@@ -16,12 +16,10 @@
 public class MethodInfo extends FunctionInfo {
 
 	boolean isAbstract = false;
-	boolean isStatic = false;
 	boolean isInline = false;
 	boolean isVirtual = false;
 	boolean isFriend = false;
 	boolean isConst = false;
-	boolean isVolatile = false;
 	int visibility;
 		
 	MethodInfo(CElement element) {
@@ -33,23 +31,15 @@
 		return isAbstract;
 	}
 
-	public void setIsAbstract(boolean isAbstract){
+	public void setAbstract(boolean isAbstract){
 		this.isAbstract = isAbstract;
 	}
 
-	public boolean isStatic(){
-		return isStatic;
-	}
-
-	public void setIsStatic(boolean isStatic){
-		this.isStatic = isStatic;
-	}
-
 	public boolean isInline(){
 		return isInline;
 	}
 
-	public void setIsInline(boolean isInline){
+	public void setInline(boolean isInline){
 		this.isInline = isInline;
 	}
 
@@ -57,7 +47,7 @@
 		return isVirtual;
 	}
 
-	public void setIsVirtual(boolean isVirtual){
+	public void setVirtual(boolean isVirtual){
 		this.isVirtual = isVirtual;
 	}
 
@@ -65,7 +55,7 @@
 		return isFriend;
 	}
 
-	public void setIsFriend(boolean isFriend){
+	public void setFriend(boolean isFriend){
 		this.isFriend = isFriend;
 	}
 
@@ -73,18 +63,9 @@
 		return isConst;
 	}
 
-	public void setIsConst(boolean isConst){
+	public void setConst(boolean isConst){
 		this.isConst = isConst;
 	}
-
-	public boolean isVolatile(){
-		return isVolatile;
-	}
-
-	public void setIsVolatile(boolean isVolatile){
-		this.isVolatile = isVolatile;
-	}
-	
 	
 	/**
 	 * Returns the visibility.
Index: model/org/eclipse/cdt/internal/core/model/Namespace.java
===================================================================
RCS file: model/org/eclipse/cdt/internal/core/model/Namespace.java
diff -N model/org/eclipse/cdt/internal/core/model/Namespace.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/internal/core/model/Namespace.java	28 Mar 2003 17:56:02 -0000
@@ -0,0 +1,26 @@
+package org.eclipse.cdt.internal.core.model;
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ * 
+ * Contributors: 
+ * Rational Software - Initial API and implementation
+***********************************************************************/
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.INamespace;
+
+public class Namespace extends SourceManipulation implements INamespace{
+
+	public Namespace(ICElement parent, String name) {
+		super(parent, name, CElement.C_NAMESPACE);
+	}
+
+	protected CElementInfo createElementInfo () {
+		return new SourceManipulationInfo(this);
+	}
+
+}
Index: model/org/eclipse/cdt/internal/core/model/Structure.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Structure.java,v
retrieving revision 1.3
diff -u -r1.3 Structure.java
--- model/org/eclipse/cdt/internal/core/model/Structure.java	26 Mar 2003 16:03:03 -0000	1.3
+++ model/org/eclipse/cdt/internal/core/model/Structure.java	28 Mar 2003 17:56:02 -0000
@@ -52,6 +52,9 @@
 		return false;
 	}
 
+	/**
+	 * @see org.eclipse.cdt.core.model.IDeclaration#getAccessControl()
+	 */
 	public int getAccessControl(){
 		return 0;
 	}
@@ -75,6 +78,30 @@
 		getStructureInfo().setTypeString(type);
 	}
 	
+	public boolean isConst() {
+		return getStructureInfo().isConst();
+	}
+
+	public void setConst(boolean isConst) {
+		getStructureInfo().setConst(isConst);
+	}
+
+	public boolean isVolatile() {
+		return getStructureInfo().isVolatile();
+	}
+
+	public void setVolatile(boolean isVolatile) {
+		getStructureInfo().setVolatile(isVolatile);
+	}
+
+	public boolean isStatic() {
+		return getStructureInfo().isStatic();
+	}
+	
+	public void setStatic(boolean isStatic) {
+		getStructureInfo().setStatic(isStatic);
+	}
+	
 	public StructureInfo getStructureInfo(){
 		return (StructureInfo) getElementInfo();
 	}
@@ -92,6 +119,7 @@
 		baseTypes = newBase;
 	}
 
+
 	protected CElementInfo createElementInfo () {
 		return new StructureInfo(this);
 	}
@@ -101,14 +129,6 @@
 	 * @IInheritance
 	 */
 	public int getAccessControl(int pos) throws CModelException {
-		return 0;
-	}
-
-
-	/**
-	 * @see org.eclipse.cdt.core.model.IVariableDeclaration#getAccesControl()
-	 */
-	public int getAccesControl() {
 		return 0;
 	}
 
Index: model/org/eclipse/cdt/internal/core/model/StructureInfo.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/StructureInfo.java,v
retrieving revision 1.1
diff -u -r1.1 StructureInfo.java
--- model/org/eclipse/cdt/internal/core/model/StructureInfo.java	26 Mar 2003 16:03:03 -0000	1.1
+++ model/org/eclipse/cdt/internal/core/model/StructureInfo.java	28 Mar 2003 17:56:01 -0000
@@ -15,7 +15,10 @@
 public class StructureInfo extends SourceManipulationInfo {
 	
 	String type;
-	
+	boolean isConst = false;
+	boolean isVolatile = false;
+	boolean isStatic = false;
+
 	protected StructureInfo (CElement element) {
 		super(element);
 		
@@ -48,6 +51,54 @@
 	}
 	public boolean hasSameContentsAs( StructureInfo otherInfo){
 		return true;
+	}
+
+	/**
+	 * Returns the isConst.
+	 * @return boolean
+	 */
+	public boolean isConst() {
+		return isConst;
+	}
+
+	/**
+	 * Returns the isStatic.
+	 * @return boolean
+	 */
+	public boolean isStatic() {
+		return isStatic;
+	}
+
+	/**
+	 * Returns the isVolatile.
+	 * @return boolean
+	 */
+	public boolean isVolatile() {
+		return isVolatile;
+	}
+
+	/**
+	 * Sets the isConst.
+	 * @param isConst The isConst to set
+	 */
+	public void setConst(boolean isConst) {
+		this.isConst = isConst;
+	}
+
+	/**
+	 * Sets the isStatic.
+	 * @param isStatic The isStatic to set
+	 */
+	public void setStatic(boolean isStatic) {
+		this.isStatic = isStatic;
+	}
+
+	/**
+	 * Sets the isVolatile.
+	 * @param isVolatile The isVolatile to set
+	 */
+	public void setVolatile(boolean isVolatile) {
+		this.isVolatile = isVolatile;
 	}
 
 }
Index: model/org/eclipse/cdt/internal/core/model/Template.java
===================================================================
RCS file: model/org/eclipse/cdt/internal/core/model/Template.java
diff -N model/org/eclipse/cdt/internal/core/model/Template.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/internal/core/model/Template.java	28 Mar 2003 17:56:02 -0000
@@ -0,0 +1,62 @@
+package org.eclipse.cdt.internal.core.model;
+
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ * 
+ * Contributors: 
+ * Rational Software - Initial API and implementation
+***********************************************************************/
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ITemplate;
+
+public class Template extends SourceManipulation implements ITemplate{
+
+	public Template(ICElement parent, String name) {
+		super(parent, name, CElement.C_TEMPLATE);
+	}
+
+	protected CElementInfo createElementInfo () {
+		return new SourceManipulationInfo(this);
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IMember#getVisibility()
+	 */
+	public int getVisibility() {
+		return 0;
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IDeclaration#getAccessControl()
+	 */
+	public int getAccessControl() {
+		return 0;
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IDeclaration#isConst()
+	 */
+	public boolean isConst() {
+		return false;
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
+	 */
+	public boolean isStatic() {
+		return false;
+	}
+
+	/**
+	 * @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
+	 */
+	public boolean isVolatile() {
+		return false;
+	}
+
+}
Index: model/org/eclipse/cdt/internal/core/model/TypeDef.java
===================================================================
RCS file: model/org/eclipse/cdt/internal/core/model/TypeDef.java
diff -N model/org/eclipse/cdt/internal/core/model/TypeDef.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/internal/core/model/TypeDef.java	28 Mar 2003 17:56:02 -0000
@@ -0,0 +1,36 @@
+package org.eclipse.cdt.internal.core.model;
+
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ * 
+ * Contributors: 
+ * Rational Software - Initial API and implementation
+***********************************************************************/
+
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ITypeDef;
+
+public class TypeDef extends SourceManipulation implements ITypeDef{
+
+	public TypeDef(ICElement parent, String name) {
+		super(parent, name, CElement.C_TYPEDEF);
+	}
+
+	protected CElementInfo createElementInfo () {
+		return new SourceManipulationInfo(this);
+	}
+	
+	
+	/**
+	 * @see org.eclipse.cdt.core.model.ITypeDef#getType()
+	 */
+	public String getType() throws CModelException {
+		return null;
+	}
+
+}
Index: model/org/eclipse/cdt/internal/core/model/Using.java
===================================================================
RCS file: model/org/eclipse/cdt/internal/core/model/Using.java
diff -N model/org/eclipse/cdt/internal/core/model/Using.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ model/org/eclipse/cdt/internal/core/model/Using.java	28 Mar 2003 17:56:02 -0000
@@ -0,0 +1,27 @@
+package org.eclipse.cdt.internal.core.model;
+
+/**********************************************************************
+ * Copyright (c) 2002,2003 Rational Software Corporation and others.
+ * All rights reserved.   This program and the accompanying materials
+ * are made available under the terms of the Common Public License v0.5
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v05.html
+ * 
+ * Contributors: 
+ * Rational Software - Initial API and implementation
+***********************************************************************/
+
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.IUsing;
+
+public class Using extends SourceManipulation implements IUsing{
+
+	public Using(ICElement parent, String name) {
+		super(parent, name, CElement.C_USING);
+	}
+
+	protected CElementInfo createElementInfo () {
+		return new SourceManipulationInfo(this);
+	}
+
+}
Index: model/org/eclipse/cdt/internal/core/model/Variable.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Variable.java,v
retrieving revision 1.2
diff -u -r1.2 Variable.java
--- model/org/eclipse/cdt/internal/core/model/Variable.java	26 Mar 2003 16:03:03 -0000	1.2
+++ model/org/eclipse/cdt/internal/core/model/Variable.java	28 Mar 2003 17:56:03 -0000
@@ -21,6 +21,31 @@
 	public void setTypeName(String type){
 		getVariableInfo().setTypeName(type);
 	}
+
+	public boolean isConst() {
+		return getVariableInfo().isConst();
+	}
+
+	public void setConst(boolean isConst) {
+		getVariableInfo().setConst(isConst);
+	}
+
+	public boolean isVolatile() {
+		return getVariableInfo().isVolatile();
+	}
+
+	public void setVolatile(boolean isVolatile) {
+		getVariableInfo().setVolatile(isVolatile);
+	}
+
+	public boolean isStatic() {
+		return getVariableInfo().isStatic();
+	}
+
+	public void setStatic(boolean isStatic) {
+		getVariableInfo().setStatic(isStatic);
+	}
+
 	public String getInitializer() {
 		return "";
 	}
Index: model/org/eclipse/cdt/internal/core/model/VariableDeclaration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/VariableDeclaration.java,v
retrieving revision 1.3
diff -u -r1.3 VariableDeclaration.java
--- model/org/eclipse/cdt/internal/core/model/VariableDeclaration.java	26 Mar 2003 16:03:03 -0000	1.3
+++ model/org/eclipse/cdt/internal/core/model/VariableDeclaration.java	28 Mar 2003 17:56:02 -0000
@@ -26,11 +26,35 @@
 		getVariableInfo().setTypeString(type);
 	}
 
+	public boolean isConst() {
+		return getVariableInfo().isConst();
+	}
+
+	public void setConst(boolean isConst) {
+		getVariableInfo().setConst(isConst);
+	}
+
+	public boolean isVolatile() {
+		return getVariableInfo().isVolatile();
+	}
+
+	public void setVolatile(boolean isVolatile) {
+		getVariableInfo().setVolatile(isVolatile);
+	}
+
+	public boolean isStatic() {
+		return getVariableInfo().isStatic();
+	}
+
+	public void setStatic(boolean isStatic) {
+		getVariableInfo().setStatic(isStatic);
+	}
+
 	public VariableInfo getVariableInfo(){
 		return (VariableInfo) getElementInfo();
 	}
 	
 	protected CElementInfo createElementInfo () {
-		return new SourceManipulationInfo(this);
+		return new VariableInfo(this);
 	}
 }
Index: model/org/eclipse/cdt/internal/core/model/VariableInfo.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/VariableInfo.java,v
retrieving revision 1.3
diff -u -r1.3 VariableInfo.java
--- model/org/eclipse/cdt/internal/core/model/VariableInfo.java	27 Mar 2003 16:05:18 -0000	1.3
+++ model/org/eclipse/cdt/internal/core/model/VariableInfo.java	28 Mar 2003 17:56:02 -0000
@@ -9,6 +9,9 @@
 
 	protected int flags;
 	String typeStr = "";
+	boolean isConst = false;
+	boolean isVolatile = false;
+	boolean isStatic = false;
 	
 	protected VariableInfo (CElement element) {
 		super(element);
@@ -41,4 +44,28 @@
 	protected void setTypeString(String type){
 		typeStr = type;
 	}
+	protected boolean isConst(){
+		return isConst;
+	}
+
+	protected void setConst(boolean isConst){
+		this.isConst = isConst;
+	}
+
+	protected boolean isVolatile(){
+		return isVolatile;
+	}
+
+	protected void setVolatile(boolean isVolatile){
+		this.isVolatile = isVolatile;
+	}
+
+	public boolean isStatic() {
+		return isStatic;
+	}
+
+	public void setStatic(boolean isStatic) {
+		this.isStatic = isStatic;
+	}
+	
 }
Index: parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java,v
retrieving revision 1.11
diff -u -r1.11 SimpleDeclarationWrapper.java
--- parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java	26 Mar 2003 16:27:44 -0000	1.11
+++ parser/org/eclipse/cdt/internal/core/model/SimpleDeclarationWrapper.java	28 Mar 2003 17:56:03 -0000
@@ -257,9 +257,11 @@
 	private CElement createField(CElement parent, String name){
 		Field newElement = new Field( parent, name );
 		newElement.setTypeName ( getTypeName() );
-		newElement.setIsConst(isConst());
-		newElement.setIsMutable(isMutable());
+		newElement.setMutable(isMutable());
 		newElement.setVisibility(this.getCurrentVisibility());
+		newElement.setConst(isConst());
+		newElement.setVolatile(isVolatile());
+		newElement.setStatic(isStatic());
 		return newElement;
 	}
 
@@ -272,6 +274,9 @@
 	private CElement createVariable(CElement parent, String name){
 		Variable newElement = new Variable( parent, name );
 		newElement.setTypeName ( getTypeName() );
+		newElement.setConst(isConst());
+		newElement.setVolatile(isVolatile());
+		newElement.setStatic(isStatic());
 		return newElement;
 	}
 
@@ -284,6 +289,9 @@
 	private CElement createVariableDeclaration(CElement parent, String name){
 		VariableDeclaration newElement = new VariableDeclaration( parent, name );
 		newElement.setTypeName ( getTypeName() );
+		newElement.setConst(isConst());
+		newElement.setVolatile(isVolatile());
+		newElement.setStatic(isStatic());
 		return newElement;
 	}
 
@@ -307,6 +315,8 @@
 		newElement.setParameterTypes(parameterTypes);
 		newElement.setReturnType( getTypeName() );
 		newElement.setVisibility(this.getCurrentVisibility());
+		newElement.setVolatile(isVolatile());
+		newElement.setStatic(isStatic());
 		return newElement;		
 	}
 
@@ -329,6 +339,8 @@
 		newElement.setParameterTypes(parameterTypes);
 		newElement.setReturnType( getTypeName() );
 		newElement.setVisibility(this.getCurrentVisibility());
+		newElement.setVolatile(isVolatile());
+		newElement.setStatic(isStatic());
 		return newElement;		
 	}
 
@@ -340,8 +352,18 @@
 	 * @return CElement
 	 */
 	private CElement createFunctionDeclaration(CElement parent, String name, Parameter[] parameters){
+		String[] parameterTypes = new String[parameters.length];
+		for( int j = 0; j< parameters.length; ++j )
+		{
+			Parameter param = parameters[j];
+			parameterTypes[j] = new String(param.getTypeName());
+		}
+
 		FunctionDeclaration newElement = new FunctionDeclaration( parent, name );
+		newElement.setParameterTypes(parameterTypes);
 		newElement.setReturnType( getTypeName() );
+		newElement.setVolatile(isVolatile());
+		newElement.setStatic(isStatic());
 		return newElement;
 	}
 
@@ -353,8 +375,18 @@
 	 * @return CElement
 	 */
 	private CElement createFunction(CElement parent, String name, Parameter[] parameters){
+		String[] parameterTypes = new String[parameters.length];
+		for( int j = 0; j< parameters.length; ++j )
+		{
+			Parameter param = parameters[j];
+			parameterTypes[j] = new String(param.getTypeName());
+		}
+
 		Function newElement = new Function( parent, name );
+		newElement.setParameterTypes(parameterTypes);
 		newElement.setReturnType( getTypeName() );
+		newElement.setVolatile(isVolatile());
+		newElement.setStatic(isStatic());
 		return newElement;
 	}
 
Index: icons/full/obj16/field_private_obj.gif
===================================================================
RCS file: icons/full/obj16/field_private_obj.gif
diff -N icons/full/obj16/field_private_obj.gif
Binary files /dev/null and field_private_obj.gif differ
Index: icons/full/obj16/field_protected_obj.gif
===================================================================
RCS file: icons/full/obj16/field_protected_obj.gif
diff -N icons/full/obj16/field_protected_obj.gif
Binary files /dev/null and field_protected_obj.gif differ
Index: icons/full/obj16/field_public_obj.gif
===================================================================
RCS file: icons/full/obj16/field_public_obj.gif
diff -N icons/full/obj16/field_public_obj.gif
Binary files /dev/null and field_public_obj.gif differ
Index: icons/full/obj16/method_private_obj.gif
===================================================================
RCS file: icons/full/obj16/method_private_obj.gif
diff -N icons/full/obj16/method_private_obj.gif
Binary files /dev/null and method_private_obj.gif differ
Index: icons/full/obj16/method_protected_obj.gif
===================================================================
RCS file: icons/full/obj16/method_protected_obj.gif
diff -N icons/full/obj16/method_protected_obj.gif
Binary files /dev/null and method_protected_obj.gif differ
Index: icons/full/obj16/method_public_obj.gif
===================================================================
RCS file: icons/full/obj16/method_public_obj.gif
diff -N icons/full/obj16/method_public_obj.gif
Binary files /dev/null and method_public_obj.gif differ
Index: icons/full/obj16/private_m.gif
===================================================================
RCS file: icons/full/obj16/private_m.gif
diff -N icons/full/obj16/private_m.gif
Binary files /tmp/cvs5y2pkf and /dev/null differ
Index: icons/full/obj16/protected_m.gif
===================================================================
RCS file: icons/full/obj16/protected_m.gif
diff -N icons/full/obj16/protected_m.gif
Binary files /tmp/cvsoIWznk and /dev/null differ
Index: icons/full/obj16/public_m.gif
===================================================================
RCS file: icons/full/obj16/public_m.gif
diff -N icons/full/obj16/public_m.gif
Binary files /tmp/cvsp2Ekpq and /dev/null differ
Index: icons/full/ovr16/c_ovr.gif
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/icons/full/ovr16/c_ovr.gif,v
retrieving revision 1.1
diff -u -r1.1 c_ovr.gif
Binary files /tmp/cvsqa7ZcF and c_ovr.gif differ
Index: src/org/eclipse/cdt/internal/ui/CElementImageProvider.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CElementImageProvider.java,v
retrieving revision 1.6
diff -u -r1.6 CElementImageProvider.java
--- src/org/eclipse/cdt/internal/ui/CElementImageProvider.java	27 Mar 2003 16:12:17 -0000	1.6
+++ src/org/eclipse/cdt/internal/ui/CElementImageProvider.java	28 Mar 2003 17:56:34 -0000
@@ -8,6 +8,8 @@
 import org.eclipse.cdt.core.model.IBinary;
 import org.eclipse.cdt.core.model.ICElement;
 import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IDeclaration;
+import org.eclipse.cdt.core.model.IField;
 import org.eclipse.cdt.core.model.IMember;
 import org.eclipse.cdt.core.model.IMethodDeclaration;
 import org.eclipse.cdt.internal.ui.util.ImageDescriptorRegistry;
@@ -206,6 +208,16 @@
 				return CPluginImages.DESC_OBJS_UNION;
 
 			case ICElement.C_FIELD:
+				IField  field = (IField)celement;
+				switch(field.getVisibility()){
+					case IMember.V_PUBLIC:
+						return CPluginImages.DESC_OBJS_PUBLIC_FIELD;
+					case IMember.V_PROTECTED:
+						return CPluginImages.DESC_OBJS_PROTECTED_FIELD;
+					case IMember.V_PRIVATE:
+						return CPluginImages.DESC_OBJS_PRIVATE_FIELD;
+				}
+
 			case ICElement.C_VARIABLE:
 				return CPluginImages.DESC_OBJS_FIELD;
 
@@ -281,28 +293,18 @@
 		
 		int flags= computeBasicAdornmentFlags(element, renderFlags);
 		
-		/* if (showOverlayIcons(renderFlags) && element instanceof ISourceReference) { 
-			ISourceReference sourceReference= (ISourceReference)element;
-			int modifiers= getModifiers(sourceReference);
-		
-			if (Flags.isAbstract(modifiers) && confirmAbstract((IMember) sourceReference))
-				flags |= JavaElementImageDescriptor.ABSTRACT;
-			if (Flags.isFinal(modifiers))
-				flags |= JavaElementImageDescriptor.FINAL;
-			if (Flags.isSynchronized(modifiers) && confirmSynchronized((IMember) sourceReference))
-				flags |= JavaElementImageDescriptor.SYNCHRONIZED;
-			if (Flags.isStatic(modifiers))
-				flags |= JavaElementImageDescriptor.STATIC;
-				
-			if (sourceReference instanceof IType) {
-				try {
-					if (JavaModelUtil.hasMainMethod((IType)sourceReference))
-						flags |= JavaElementImageDescriptor.RUNNABLE;
-				} catch (JavaModelException e) {
-					// do nothing. Can't compute runnable adornment.
-				}
+		if (showOverlayIcons(renderFlags) && element instanceof IDeclaration) {
+			IDeclaration decl = (IDeclaration) element;
+			if(decl.isStatic()){
+				flags |= CElementImageDescriptor.STATIC;
+			}
+			if(decl.isConst()){
+				flags |= CElementImageDescriptor.CONSTANT;
 			}
-		} */
+			if(decl.isVolatile()){
+				flags |= CElementImageDescriptor.VOLATILE;
+			}
+		}
 		return flags;
 	}
 	
Index: src/org/eclipse/cdt/internal/ui/CPluginImages.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CPluginImages.java,v
retrieving revision 1.5
diff -u -r1.5 CPluginImages.java
--- src/org/eclipse/cdt/internal/ui/CPluginImages.java	26 Mar 2003 16:02:58 -0000	1.5
+++ src/org/eclipse/cdt/internal/ui/CPluginImages.java	28 Mar 2003 17:56:34 -0000
@@ -48,9 +48,12 @@
 	public static final String IMG_OBJS_STRUCT= NAME_PREFIX + "struct_obj.gif";
 	public static final String IMG_OBJS_UNION= NAME_PREFIX + "union_obj.gif";
 	public static final String IMG_OBJS_FUNCTION= NAME_PREFIX + "function_obj.gif";
-	public static final String IMG_OBJS_PUBLIC_METHOD= NAME_PREFIX + "public_m.gif";
-	public static final String IMG_OBJS_PROTECTED_METHOD= NAME_PREFIX + "protected_m.gif";
-	public static final String IMG_OBJS_PRIVATE_METHOD= NAME_PREFIX + "private_m.gif";	
+	public static final String IMG_OBJS_PUBLIC_METHOD= NAME_PREFIX + "method_public_obj.gif";
+	public static final String IMG_OBJS_PROTECTED_METHOD= NAME_PREFIX + "method_protected_obj.gif";
+	public static final String IMG_OBJS_PRIVATE_METHOD= NAME_PREFIX + "method_private_obj.gif";	
+	public static final String IMG_OBJS_PUBLIC_FIELD= NAME_PREFIX + "field_public_obj.gif";
+	public static final String IMG_OBJS_PROTECTED_FIELD= NAME_PREFIX + "field_protected_obj.gif";
+	public static final String IMG_OBJS_PRIVATE_FIELD= NAME_PREFIX + "field_private_obj.gif";	
 	public static final String IMG_OBJS_DECLARATION= NAME_PREFIX + "cdeclaration_obj.gif";
 	public static final String IMG_OBJS_INCLUDE= NAME_PREFIX + "include_obj.gif";
 	public static final String IMG_OBJS_MACRO= NAME_PREFIX + "define_obj.gif";
@@ -76,6 +79,9 @@
 	public static final ImageDescriptor DESC_OBJS_PUBLIC_METHOD= createManaged(T_OBJ, IMG_OBJS_PUBLIC_METHOD);
 	public static final ImageDescriptor DESC_OBJS_PROTECTED_METHOD= createManaged(T_OBJ, IMG_OBJS_PROTECTED_METHOD);
 	public static final ImageDescriptor DESC_OBJS_PRIVATE_METHOD= createManaged(T_OBJ, IMG_OBJS_PRIVATE_METHOD);	
+	public static final ImageDescriptor DESC_OBJS_PUBLIC_FIELD= createManaged(T_OBJ, IMG_OBJS_PUBLIC_FIELD);
+	public static final ImageDescriptor DESC_OBJS_PROTECTED_FIELD= createManaged(T_OBJ, IMG_OBJS_PROTECTED_FIELD);
+	public static final ImageDescriptor DESC_OBJS_PRIVATE_FIELD= createManaged(T_OBJ, IMG_OBJS_PRIVATE_FIELD);	
 	public static final ImageDescriptor DESC_OBJS_DECLARARION= createManaged(T_OBJ, IMG_OBJS_DECLARATION);
 	public static final ImageDescriptor DESC_OBJS_INCLUDE= createManaged(T_OBJ, IMG_OBJS_INCLUDE);
 	public static final ImageDescriptor DESC_OBJS_MACRO= createManaged(T_OBJ, IMG_OBJS_MACRO);
@@ -103,7 +109,8 @@
 	public static final String IMG_EDIT_PROPERTIES= NAME_PREFIX + "prop_edt.gif";
 	public static final ImageDescriptor DESC_OBJS_TEMPLATE= createManaged(T_OBJ, IMG_OBJS_TEMPLATE);
 	
-	public static final ImageDescriptor DESC_OVR_STATIC= create(T_OVR, "static_co.gif");//$NON-NLS-1$
+	public static final ImageDescriptor DESC_OVR_STATIC= create(T_OVR, "static_co.gif");
+	public static final ImageDescriptor DESC_OVR_CONSTANT= create(T_OVR, "c_ovr.gif");
 
 	public static final ImageDescriptor DESC_OVR_WARNING= create(T_OVR, "warning_co.gif");
 	public static final ImageDescriptor DESC_OVR_ERROR= create(T_OVR, "error_co.gif");
Index: src/org/eclipse/cdt/ui/CElementImageDescriptor.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementImageDescriptor.java,v
retrieving revision 1.1
diff -u -r1.1 CElementImageDescriptor.java
--- src/org/eclipse/cdt/ui/CElementImageDescriptor.java	6 Feb 2003 20:48:31 -0000	1.1
+++ src/org/eclipse/cdt/ui/CElementImageDescriptor.java	28 Mar 2003 17:56:33 -0000
@@ -33,11 +33,11 @@
 	/** Flag to render the abstract adornment */
 	public final static int ABSTRACT= 		0x001;
 	
-	/** Flag to render the final adornment */
-	public final static int FINAL=			0x002;
+	/** Flag to render the const adornment */
+	public final static int CONSTANT=		0x002;
 	
-	/** Flag to render the synchronized adornment */
-	public final static int SYNCHRONIZED=	0x004;
+	/** Flag to render the volatile adornment */
+	public final static int VOLATILE=		0x004;
 	
 	/** Flag to render the static adornment */
 	public final static int STATIC=			0x008;
@@ -160,15 +160,15 @@
 	}	
 	
 	private void drawTopRight() {		
-		//int x= getSize().x;
-		//ImageData data= null;
+		int x= getSize().x;
+		ImageData data= null;
 		/* if ((fFlags & ABSTRACT) != 0) {
 			data= CPluginImages.DESC_OVR_ABSTRACT.getImageData();
 			x-= data.width;
 			drawImage(data, x, 0);
-		}
-		if ((fFlags & FINAL) != 0) {
-			data= CPluginImages.DESC_OVR_FINAL.getImageData();
+		}*/
+		if ((fFlags & CONSTANT) != 0) {
+			data= CPluginImages.DESC_OVR_CONSTANT.getImageData();
 			x-= data.width;
 			drawImage(data, x, 0);
 		}
@@ -176,14 +176,14 @@
 			data= CPluginImages.DESC_OVR_STATIC.getImageData();
 			x-= data.width;
 			drawImage(data, x, 0);
-		} */
+		} 
 	}		
 	
 	private void drawBottomRight() {
 		//Point size= getSize();
 		//int x= size.x;
 		//ImageData data= null;
-		/* if ((fFlags & SYNCHRONIZED) != 0) {
+		 /*if ((fFlags & SYNCHRONIZED) != 0) {
 			data= CPluginImages.DESC_OVR_SYNCH.getImageData();
 			x-= data.width;
 			drawImage(data, x, size.y - data.height);

Attachment: field_private_obj.gif
Description: GIF image

Attachment: field_protected_obj.gif
Description: GIF image

Attachment: field_public_obj.gif
Description: GIF image

Attachment: c_ovr.gif
Description: GIF image


Back to the top