Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 108782 Details for
Bug 238550
Schema code completion causes stack error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Apply to org.eclipse.wst.xml.core
bug238550-patch.txt (text/plain), 2.54 KB, created by
Keith Chong
on 2008-07-30 16:51:13 EDT
(
hide
)
Description:
Apply to org.eclipse.wst.xml.core
Filename:
MIME Type:
Creator:
Keith Chong
Created:
2008-07-30 16:51:13 EDT
Size:
2.54 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.xml.core >Index: src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java,v >retrieving revision 1.4 >diff -u -r1.4 CMDescriptionBuilder.java >--- src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java 10 Apr 2007 20:05:35 -0000 1.4 >+++ src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java 30 Jul 2008 20:49:14 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2006 IBM Corporation and others. >+ * Copyright (c) 2002, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -12,6 +12,8 @@ > *******************************************************************************/ > package org.eclipse.wst.xml.core.internal.contentmodel.util; > >+import java.util.Stack; >+ > import org.eclipse.wst.xml.core.internal.contentmodel.CMAnyElement; > import org.eclipse.wst.xml.core.internal.contentmodel.CMContent; > import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType; >@@ -27,6 +29,7 @@ > protected StringBuffer sb; > protected CMNode root; > protected boolean isRootVisited; >+ protected Stack visitedCMGroupStack = new Stack(); > > public String buildDescription(CMNode node) > { >@@ -59,6 +62,11 @@ > > public void visitCMGroup(CMGroup group) > { >+ // This is to prevent recursion. >+ if (visitedCMGroupStack.contains(group)) >+ { >+ return; >+ } > int op = group.getOperator(); > if (op == CMGroup.ALL) > { >@@ -73,7 +81,10 @@ > { > separator = " | "; //$NON-NLS-1$ > } >- >+ >+ // Push the current group to check later to avoid potential recursion >+ visitedCMGroupStack.push(group); >+ > CMNodeList nodeList = group.getChildNodes(); > int size = nodeList.getLength(); > for (int i = 0; i < size; i++) >@@ -84,6 +95,10 @@ > sb.append(separator); > } > } >+ >+ // Pop the current group >+ visitedCMGroupStack.pop(); >+ > sb.append(")"); //$NON-NLS-1$ > addOccurenceSymbol(group); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238550
:
105911
|
105915
| 108782